Merge branch 'feature-60-tm4-fork' into feature-59-tm4
1. TM4 works on dlsim_tm4.c with full HARQ support for both PIA and SIC.
This commit is contained in:
@@ -1827,7 +1827,19 @@ target_link_libraries (oaisim_nos1 ${T_LIB})
|
|||||||
# Unitary tests for each piece of L1: example, mbmssim is MBMS L1 simulator
|
# Unitary tests for each piece of L1: example, mbmssim is MBMS L1 simulator
|
||||||
#####################################
|
#####################################
|
||||||
|
|
||||||
foreach(myExe dlsim dlsim_tm4 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim)
|
#special case for dlim TM4, which uses its own version of phy_scope code
|
||||||
|
add_executable(dlsim_tm4
|
||||||
|
${OPENAIR_BIN_DIR}/messages_xml.h
|
||||||
|
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/dlsim_tm4.c
|
||||||
|
${OPENAIR1_DIR}/PHY/TOOLS/lte_phy_scope_tm4.c
|
||||||
|
${T_SOURCE}
|
||||||
|
)
|
||||||
|
target_link_libraries (dlsim_tm4
|
||||||
|
-Wl,--start-group SIMU UTIL SCHED_LIB PHY LFDS ${ITTI_LIB} -Wl,--end-group
|
||||||
|
pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB}
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach(myExe dlsim ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim)
|
||||||
add_executable(${myExe}
|
add_executable(${myExe}
|
||||||
${OPENAIR_BIN_DIR}/messages_xml.h
|
${OPENAIR_BIN_DIR}/messages_xml.h
|
||||||
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c
|
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c
|
||||||
|
|||||||
Regular → Executable
+12
-5
@@ -952,8 +952,8 @@ void phy_init_lte_ue__PDSCH( LTE_UE_PDSCH* const pdsch, const LTE_DL_FRAME_PARMS
|
|||||||
pdsch->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
pdsch->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
pdsch->dl_ch_mag0 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
pdsch->dl_ch_mag0 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
pdsch->dl_ch_magb0 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
pdsch->dl_ch_magb0 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
pdsch->dl_ch_mag1 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
//pdsch->dl_ch_mag1 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
pdsch->dl_ch_magb1 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
//pdsch->dl_ch_magb1 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
|
|
||||||
// the allocated memory size is fixed:
|
// the allocated memory size is fixed:
|
||||||
AssertFatal( fp->nb_antennas_rx <= 2, "nb_antennas_rx > 2" );
|
AssertFatal( fp->nb_antennas_rx <= 2, "nb_antennas_rx > 2" );
|
||||||
@@ -969,8 +969,8 @@ void phy_init_lte_ue__PDSCH( LTE_UE_PDSCH* const pdsch, const LTE_DL_FRAME_PARMS
|
|||||||
pdsch->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
pdsch->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
pdsch->dl_ch_mag0[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
pdsch->dl_ch_mag0[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
pdsch->dl_ch_magb0[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
pdsch->dl_ch_magb0[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
pdsch->dl_ch_mag1[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
//pdsch->dl_ch_mag1[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
pdsch->dl_ch_magb1[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
//pdsch->dl_ch_magb1[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1079,30 +1079,37 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
|
|||||||
pdsch_vars[eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
|
pdsch_vars[eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
|
||||||
pdsch_vars[eNB_id]->llr128_2ndstream = (int16_t**)malloc16_clear( sizeof(int16_t*) );
|
pdsch_vars[eNB_id]->llr128_2ndstream = (int16_t**)malloc16_clear( sizeof(int16_t*) );
|
||||||
|
|
||||||
|
|
||||||
pdsch_vars[eNB_id]->rho = (int32_t**)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t*) );
|
pdsch_vars[eNB_id]->rho = (int32_t**)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t*) );
|
||||||
for (int i=0; i<fp->nb_antennas_rx; i++)
|
for (int i=0; i<fp->nb_antennas_rx; i++)
|
||||||
pdsch_vars[eNB_id]->rho[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->N_RB_DL*12*7*2) );
|
pdsch_vars[eNB_id]->rho[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->N_RB_DL*12*7*2) );
|
||||||
|
|
||||||
|
|
||||||
pdsch_vars[eNB_id]->dl_ch_rho2_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
pdsch_vars[eNB_id]->dl_ch_rho2_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
for (i=0; i<fp->nb_antennas_rx; i++)
|
for (i=0; i<fp->nb_antennas_rx; i++)
|
||||||
for (j=0; j<4; j++) {
|
for (j=0; j<4; j++) {
|
||||||
const int idx = (j<<1)+i;
|
const int idx = (j<<1)+i;
|
||||||
|
|
||||||
const size_t num = 7*2*fp->N_RB_DL*12+4;
|
const size_t num = 7*2*fp->N_RB_DL*12+4;
|
||||||
pdsch_vars[eNB_id]->dl_ch_rho2_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
pdsch_vars[eNB_id]->dl_ch_rho2_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
}
|
}
|
||||||
|
|
||||||
const size_t num = 7*2*fp->N_RB_DL*12+4;
|
const size_t num = 7*2*fp->N_RB_DL*12+4;
|
||||||
for (k=0;k<8;k++) { //harq_pid
|
for (k=0;k<8;k++) { //harq_pid
|
||||||
|
|
||||||
for (l=0;l<8;l++) { //round
|
for (l=0;l<8;l++) { //round
|
||||||
pdsch_vars[eNB_id]->rxdataF_comp1[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
pdsch_vars[eNB_id]->rxdataF_comp1[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
pdsch_vars[eNB_id]->dl_ch_rho_ext[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
pdsch_vars[eNB_id]->dl_ch_rho_ext[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
// pdsch_vars[eNB_id]->clean_x1[k][l] = (int16_t*)malloc16_clear( sizeof(int32_t) * num);
|
pdsch_vars[eNB_id]->dl_ch_mag1[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
|
pdsch_vars[eNB_id]->dl_ch_magb1[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
|
|
||||||
for (int i=0; i<fp->nb_antennas_rx; i++)
|
for (int i=0; i<fp->nb_antennas_rx; i++)
|
||||||
for (int j=0; j<4; j++) { //frame_parms->nb_antennas_tx; j++)
|
for (int j=0; j<4; j++) { //frame_parms->nb_antennas_tx; j++)
|
||||||
const int idx = (j<<1)+i;
|
const int idx = (j<<1)+i;
|
||||||
pdsch_vars[eNB_id]->dl_ch_rho_ext[k][l][idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
pdsch_vars[eNB_id]->dl_ch_rho_ext[k][l][idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
pdsch_vars[eNB_id]->rxdataF_comp1[k][l][idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
pdsch_vars[eNB_id]->rxdataF_comp1[k][l][idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
|
pdsch_vars[eNB_id]->dl_ch_mag1[k][l][idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
|
pdsch_vars[eNB_id]->dl_ch_magb1[k][l][idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Regular → Executable
+693
-346
File diff suppressed because it is too large
Load Diff
Regular → Executable
+4
@@ -172,6 +172,8 @@ typedef struct {
|
|||||||
uint8_t Nlayers;
|
uint8_t Nlayers;
|
||||||
/// First layer for this PSCH transmission
|
/// First layer for this PSCH transmission
|
||||||
uint8_t first_layer;
|
uint8_t first_layer;
|
||||||
|
/// codeword this transport block is mapped to
|
||||||
|
uint8_t codeword;
|
||||||
} LTE_DL_eNB_HARQ_t;
|
} LTE_DL_eNB_HARQ_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -575,6 +577,8 @@ typedef struct {
|
|||||||
uint32_t trials[8];
|
uint32_t trials[8];
|
||||||
/// error statistics per round
|
/// error statistics per round
|
||||||
uint32_t errors[8];
|
uint32_t errors[8];
|
||||||
|
/// codeword this transport block is mapped to
|
||||||
|
uint8_t codeword;
|
||||||
} LTE_DL_UE_HARQ_t;
|
} LTE_DL_UE_HARQ_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
@@ -698,6 +698,7 @@ int dlsch_encoding(unsigned char *a,
|
|||||||
nb_rb,
|
nb_rb,
|
||||||
m); // r
|
m); // r
|
||||||
stop_meas(rm_stats);
|
stop_meas(rm_stats);
|
||||||
|
//printf("dlsch->harq_processes[harq_pid]->rvidx = %d\n", dlsch->harq_processes[harq_pid]->rvidx);
|
||||||
#ifdef DEBUG_DLSCH_CODING
|
#ifdef DEBUG_DLSCH_CODING
|
||||||
|
|
||||||
if (r==dlsch->harq_processes[harq_pid]->C-1)
|
if (r==dlsch->harq_processes[harq_pid]->C-1)
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
|
|||||||
harq_process->round);
|
harq_process->round);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//printf("dlsch->harq_processes[harq_pid]->rvidx = %d\n", dlsch->harq_processes[harq_pid]->rvidx);
|
||||||
if (lte_rate_matching_turbo_rx(harq_process->RTC[r],
|
if (lte_rate_matching_turbo_rx(harq_process->RTC[r],
|
||||||
G,
|
G,
|
||||||
harq_process->w[r],
|
harq_process->w[r],
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -540,13 +540,13 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
uint8_t *x0 = 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;
|
||||||
uint8_t mod_order0 = get_Qm(dlsch0_harq->mcs);
|
uint8_t mod_order0; // = get_Qm(dlsch0_harq->mcs);
|
||||||
uint8_t mod_order1=2;
|
uint8_t mod_order1; //=2;
|
||||||
uint8_t precoder_index0,precoder_index1;
|
uint8_t precoder_index0,precoder_index1;
|
||||||
|
|
||||||
uint8_t *x1=NULL;
|
uint8_t *x1=NULL;
|
||||||
@@ -584,18 +584,48 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
gain_lin_QPSK = (int16_t)((amp*ONE_OVER_SQRT2_Q15)>>15);
|
gain_lin_QPSK = (int16_t)((amp*ONE_OVER_SQRT2_Q15)>>15);
|
||||||
// if (mimo_mode == LARGE_CDD) gain_lin_QPSK>>=1;
|
// if (mimo_mode == LARGE_CDD) gain_lin_QPSK>>=1;
|
||||||
|
|
||||||
if (dlsch1_harq) {
|
|
||||||
|
|
||||||
|
if ((dlsch0_harq != NULL) && (dlsch1_harq != NULL)) { //this is for TM3, TM4
|
||||||
|
|
||||||
|
x0 = dlsch0_harq->e;
|
||||||
|
mimo_mode = dlsch0_harq->mimo_mode;
|
||||||
|
first_layer0 = dlsch0_harq->first_layer;
|
||||||
|
Nlayers0 = dlsch0_harq->Nlayers;
|
||||||
|
mod_order0 = get_Qm(dlsch0_harq->mcs);
|
||||||
x1 = dlsch1_harq->e;
|
x1 = dlsch1_harq->e;
|
||||||
// Fill these in later for TM8-10
|
// Fill these in later for TM8-10
|
||||||
// Nlayers1 = dlsch1_harq->Nlayers;
|
// Nlayers1 = dlsch1_harq->Nlayers;
|
||||||
// first_layer1 = dlsch1_harq->first_layer;
|
// first_layer1 = dlsch1_harq->first_layer;
|
||||||
mod_order1 = get_Qm(dlsch1_harq->mcs);
|
mod_order1 = get_Qm(dlsch1_harq->mcs);
|
||||||
|
|
||||||
|
} else if ((dlsch0_harq != NULL) && (dlsch1_harq == NULL)){ //This is for SIS0 TM1, TM6, etc
|
||||||
|
|
||||||
|
x0 = dlsch0_harq->e;
|
||||||
|
mimo_mode = dlsch0_harq->mimo_mode;
|
||||||
|
first_layer0 = dlsch0_harq->first_layer;
|
||||||
|
Nlayers0 = dlsch0_harq->Nlayers;
|
||||||
|
mod_order0 = get_Qm(dlsch0_harq->mcs);
|
||||||
|
|
||||||
|
} else if ((dlsch0_harq == NULL) && (dlsch1_harq != NULL)){ // This is for TM4 retransmission
|
||||||
|
|
||||||
|
x0 = dlsch1_harq->e;
|
||||||
|
mimo_mode = dlsch1_harq->mimo_mode;
|
||||||
|
first_layer0 = dlsch1_harq->first_layer;
|
||||||
|
Nlayers0 = dlsch1_harq->Nlayers;
|
||||||
|
mod_order0 = get_Qm(dlsch1_harq->mcs);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_DLSCH_MODULATION
|
if (dlsch0_harq != NULL){
|
||||||
printf("allocate_re (mod %d): symbol_offset %d re_offset %d (%d,%d), jj %d -> %d,%d\n",mod_order0,symbol_offset,re_offset,skip_dc,skip_half,*jj, x0[*jj], x0[1+*jj]);
|
#ifdef DEBUG_DLSCH_MODULATION
|
||||||
#endif
|
printf("allocate_re (mod %d): symbol_offset %d re_offset %d (%d,%d), jj %d -> %d,%d\n",mod_order0,symbol_offset,re_offset,skip_dc,skip_half,*jj, x0[*jj], x0[1+*jj]);
|
||||||
|
#endif
|
||||||
|
} else{
|
||||||
|
#ifdef DEBUG_DLSCH_MODULATION
|
||||||
|
printf("allocate_re (mod %d): symbol_offset %d re_offset %d (%d,%d), jj %d -> %d,%d\n",mod_order0,symbol_offset,re_offset,skip_dc,skip_half,*jj, x0[*jj], x0[1+*jj]);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
first_re=0;
|
first_re=0;
|
||||||
last_re=12;
|
last_re=12;
|
||||||
@@ -777,7 +807,7 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
((int16_t *)&txdataF[0][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
|
((int16_t *)&txdataF[0][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
|
||||||
|
|
||||||
//((int16_t *)&txdataF[0][tti_offset])[0]+=(qam_table_s0[qam16_table_offset_re]*ONE_OVER_SQRT2_Q15)>>15;
|
//((int16_t *)&txdataF[0][tti_offset])[0]+=(qam_table_s0[qam16_table_offset_re]*ONE_OVER_SQRT2_Q15)>>15;
|
||||||
//((int16_t *)&txdataF[0][tti_offset])[1]+=(qam_table_s0[qam16_table_offset_im]*ONE_OVER_SQRT2_Q15)>>15;
|
//((int16_t *)&txdataF[0][tti_offset])[1]+=(qam_table_s0[qam16_table_offset_im]*ONE_OVER_SQRT2_Q15)>>15;
|
||||||
|
|
||||||
// Antenna 1 position n Real part -> -x1*
|
// Antenna 1 position n Real part -> -x1*
|
||||||
|
|
||||||
@@ -802,8 +832,8 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
((int16_t *)&txdataF[1][tti_offset])[0]+=-(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
|
((int16_t *)&txdataF[1][tti_offset])[0]+=-(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
|
||||||
((int16_t *)&txdataF[1][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
|
((int16_t *)&txdataF[1][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
|
||||||
|
|
||||||
//((int16_t *)&txdataF[1][tti_offset])[0]+=-qam_table_s0[qam16_table_offset_re];
|
//((int16_t *)&txdataF[1][tti_offset])[0]+=-qam_table_s0[qam16_table_offset_re];
|
||||||
//((int16_t *)&txdataF[1][tti_offset])[1]+=qam_table_s0[qam16_table_offset_im];
|
//((int16_t *)&txdataF[1][tti_offset])[1]+=qam_table_s0[qam16_table_offset_im];
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -834,8 +864,8 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
|
|
||||||
//((int16_t *)&txdataF[0][tti_offset])[0]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
|
//((int16_t *)&txdataF[0][tti_offset])[0]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
|
||||||
//((int16_t *)&txdataF[0][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
|
//((int16_t *)&txdataF[0][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
|
||||||
((int16_t *)&txdataF[0][tti_offset])[0]+=(qam_table_s0[qam64_table_offset_re]*ONE_OVER_SQRT2_Q15)>>15;
|
((int16_t *)&txdataF[0][tti_offset])[0]+=(qam_table_s0[qam64_table_offset_re]*ONE_OVER_SQRT2_Q15)>>15;
|
||||||
((int16_t *)&txdataF[0][tti_offset])[1]+=(qam_table_s0[qam64_table_offset_im]*ONE_OVER_SQRT2_Q15)>>15;
|
((int16_t *)&txdataF[0][tti_offset])[1]+=(qam_table_s0[qam64_table_offset_im]*ONE_OVER_SQRT2_Q15)>>15;
|
||||||
|
|
||||||
// Antenna 1 => -x1*
|
// Antenna 1 => -x1*
|
||||||
qam64_table_offset_re = 0;
|
qam64_table_offset_re = 0;
|
||||||
@@ -861,12 +891,12 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
|
|
||||||
//((int16_t *)&txdataF[1][tti_offset])[0]+=-(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
|
//((int16_t *)&txdataF[1][tti_offset])[0]+=-(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
|
||||||
//((int16_t *)&txdataF[1][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
|
//((int16_t *)&txdataF[1][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
|
||||||
((int16_t *)&txdataF[1][tti_offset])[0]+=-qam_table_s0[qam64_table_offset_re];
|
((int16_t *)&txdataF[1][tti_offset])[0]+=-qam_table_s0[qam64_table_offset_re];
|
||||||
((int16_t *)&txdataF[1][tti_offset])[1]+=qam_table_s0[qam64_table_offset_im];
|
((int16_t *)&txdataF[1][tti_offset])[1]+=qam_table_s0[qam64_table_offset_im];
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// fill in the rest of the ALAMOUTI precoding
|
// fill in the rest of the ALAMOUTI precoding
|
||||||
if (is_not_pilot(pilots,re + 1,frame_parms->nushift,use2ndpilots)==1) {
|
if (is_not_pilot(pilots,re + 1,frame_parms->nushift,use2ndpilots)==1) {
|
||||||
((int16_t *)&txdataF[0][tti_offset+1])[0] += -((int16_t *)&txdataF[1][tti_offset])[0]; //x1
|
((int16_t *)&txdataF[0][tti_offset+1])[0] += -((int16_t *)&txdataF[1][tti_offset])[0]; //x1
|
||||||
((int16_t *)&txdataF[0][tti_offset+1])[1] += ((int16_t *)&txdataF[1][tti_offset])[1];
|
((int16_t *)&txdataF[0][tti_offset+1])[1] += ((int16_t *)&txdataF[1][tti_offset])[1];
|
||||||
@@ -1460,7 +1490,6 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int allocate_REs_in_RB_MCH(int32_t **txdataF,
|
int allocate_REs_in_RB_MCH(int32_t **txdataF,
|
||||||
uint32_t *jj,
|
uint32_t *jj,
|
||||||
uint16_t re_offset,
|
uint16_t re_offset,
|
||||||
@@ -1804,21 +1833,22 @@ int dlsch_modulation(int32_t **txdataF,
|
|||||||
{
|
{
|
||||||
|
|
||||||
uint8_t nsymb;
|
uint8_t nsymb;
|
||||||
uint8_t harq_pid = dlsch0->current_harq_pid;
|
uint8_t harq_pid; //= dlsch0->current_harq_pid;
|
||||||
LTE_DL_eNB_HARQ_t *dlsch0_harq = dlsch0->harq_processes[harq_pid];
|
LTE_DL_eNB_HARQ_t *dlsch0_harq;
|
||||||
LTE_DL_eNB_HARQ_t *dlsch1_harq; //= dlsch1->harq_processes[harq_pid];
|
LTE_DL_eNB_HARQ_t *dlsch1_harq; //= dlsch1->harq_processes[harq_pid];
|
||||||
uint32_t i,i2,jj,jj2,re_allocated,symbol_offset;
|
uint32_t i,i2,jj,jj2,re_allocated,symbol_offset;
|
||||||
uint16_t l,rb,re_offset;
|
uint16_t l,rb,re_offset;
|
||||||
uint32_t rb_alloc_ind;
|
uint32_t rb_alloc_ind;
|
||||||
uint32_t *rb_alloc = dlsch0_harq->rb_alloc;
|
uint32_t *rb_alloc; //=dlsch0_harq->rb_alloc;
|
||||||
|
|
||||||
uint8_t pilots=0;
|
uint8_t pilots=0;
|
||||||
uint8_t skip_dc=0,skip_half=0;
|
uint8_t skip_dc,skip_half;
|
||||||
uint8_t mod_order0 = get_Qm(dlsch0_harq->mcs);
|
uint8_t mod_order0 = 0;
|
||||||
uint8_t mod_order1 = 0;
|
uint8_t mod_order1 = 0;
|
||||||
int16_t amp_rho_a, amp_rho_b;
|
int16_t amp_rho_a, amp_rho_b;
|
||||||
int16_t qam16_table_a0[4],qam64_table_a0[8],qam16_table_b0[4],qam64_table_b0[8];
|
int16_t qam16_table_a0[4],qam64_table_a0[8],qam16_table_b0[4],qam64_table_b0[8];
|
||||||
int16_t qam16_table_a1[4],qam64_table_a1[8],qam16_table_b1[4],qam64_table_b1[8];
|
int16_t qam16_table_a1[4],qam64_table_a1[8],qam16_table_b1[4],qam64_table_b1[8];
|
||||||
int16_t *qam_table_s0=NULL,*qam_table_s1=NULL;
|
|
||||||
int (*allocate_REs)(LTE_DL_FRAME_PARMS *,
|
int (*allocate_REs)(LTE_DL_FRAME_PARMS *,
|
||||||
int **,
|
int **,
|
||||||
uint32_t*,
|
uint32_t*,
|
||||||
@@ -1837,28 +1867,77 @@ int dlsch_modulation(int32_t **txdataF,
|
|||||||
uint8_t,
|
uint8_t,
|
||||||
int *,
|
int *,
|
||||||
int *);
|
int *);
|
||||||
|
|
||||||
int P1_SHIFT[13],P2_SHIFT[13];
|
int P1_SHIFT[13],P2_SHIFT[13];
|
||||||
int offset,nushiftmod3;
|
int offset,nushiftmod3;
|
||||||
|
int16_t *qam_table_s0,*qam_table_s1;
|
||||||
|
uint8_t get_pmi_temp;
|
||||||
|
|
||||||
#ifdef DEBUG_DLSCH_MODULATION
|
#ifdef DEBUG_DLSCH_MODULATION
|
||||||
uint8_t Nl0 = dlsch0_harq->Nl;
|
uint8_t Nl0; //= dlsch0_harq->Nl;
|
||||||
uint8_t Nl1;
|
uint8_t Nl1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (dlsch1) {
|
if ((dlsch0 != NULL) && (dlsch1 != NULL)){
|
||||||
|
harq_pid = dlsch0->current_harq_pid;
|
||||||
|
dlsch0_harq = dlsch0->harq_processes[harq_pid];
|
||||||
|
mod_order0 = get_Qm(dlsch0_harq->mcs);
|
||||||
|
rb_alloc = dlsch0_harq->rb_alloc;
|
||||||
|
#ifdef DEBUG_DLSCH_MODULATION
|
||||||
|
Nl0 = dlsch0_harq->Nl;
|
||||||
|
#endif
|
||||||
|
|
||||||
dlsch1_harq = dlsch1->harq_processes[harq_pid];
|
dlsch1_harq = dlsch1->harq_processes[harq_pid];
|
||||||
mod_order1 = get_Qm(dlsch1_harq->mcs);
|
mod_order1 = get_Qm(dlsch1_harq->mcs);
|
||||||
#ifdef DEBUG_DLSCH_MODULATION
|
#ifdef DEBUG_DLSCH_MODULATION
|
||||||
Nl1 = dlsch1_harq->Nl;
|
Nl1 = dlsch1_harq->Nl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
}else if ((dlsch0 != NULL) && (dlsch1 == NULL)){
|
||||||
|
|
||||||
|
harq_pid = dlsch0->current_harq_pid;
|
||||||
|
dlsch0_harq = dlsch0->harq_processes[harq_pid];
|
||||||
|
mod_order0 = get_Qm(dlsch0_harq->mcs);
|
||||||
|
rb_alloc = dlsch0_harq->rb_alloc;
|
||||||
|
#ifdef DEBUG_DLSCH_MODULATION
|
||||||
|
Nl0 = dlsch0_harq->Nl;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
dlsch1_harq = NULL;
|
||||||
|
mod_order1 = 0;
|
||||||
|
#ifdef DEBUG_DLSCH_MODULATION
|
||||||
|
Nl1 = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}else if ((dlsch0 == NULL) && (dlsch1 != NULL)){
|
||||||
|
|
||||||
|
harq_pid = dlsch1->current_harq_pid;
|
||||||
|
dlsch1_harq = dlsch1->harq_processes[harq_pid];
|
||||||
|
mod_order0 = get_Qm(dlsch1_harq->mcs);
|
||||||
|
rb_alloc = dlsch1_harq->rb_alloc;
|
||||||
|
#ifdef DEBUG_DLSCH_MODULATION
|
||||||
|
Nl0 = dlsch1_harq->Nl;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
dlsch0_harq = NULL;
|
||||||
|
mod_order1 = 0;
|
||||||
|
#ifdef DEBUG_DLSCH_MODULATION
|
||||||
|
Nl1 = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION, VCD_FUNCTION_IN);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION, VCD_FUNCTION_IN);
|
||||||
|
|
||||||
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++) {
|
||||||
@@ -1892,6 +1971,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,
|
||||||
@@ -1902,6 +1982,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))
|
||||||
@@ -2034,9 +2115,12 @@ int dlsch_modulation(int32_t **txdataF,
|
|||||||
skip_dc = check_skip_dc(rb,frame_parms);
|
skip_dc = check_skip_dc(rb,frame_parms);
|
||||||
|
|
||||||
|
|
||||||
if (dlsch0_harq->Nlayers>1) {
|
|
||||||
printf("Nlayers %d: re_offset %d, symbol %d offset %d\n",dlsch0_harq->Nlayers,re_offset,l,symbol_offset);
|
if (dlsch0) {
|
||||||
return(-1);
|
if (dlsch0_harq->Nlayers>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) {
|
||||||
@@ -2051,17 +2135,29 @@ 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);
|
||||||
|
|
||||||
allocate_REs(frame_parms,
|
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,
|
||||||
txdataF,
|
txdataF,
|
||||||
&jj,
|
&jj,
|
||||||
&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,
|
||||||
@@ -2087,7 +2183,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;
|
||||||
|
|||||||
@@ -254,7 +254,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
|
||||||
@@ -755,15 +755,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,
|
||||||
@@ -788,30 +788,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,
|
||||||
@@ -924,12 +924,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,
|
||||||
@@ -1002,7 +1002,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
|
||||||
@@ -1048,7 +1048,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,
|
||||||
@@ -1067,18 +1067,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
|
||||||
@@ -1096,13 +1096,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,
|
||||||
@@ -1168,15 +1168,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,
|
||||||
@@ -1481,7 +1481,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,
|
||||||
@@ -1731,6 +1731,8 @@ void reset_cba_uci(void *o);
|
|||||||
*/
|
*/
|
||||||
uint16_t quantize_subband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id,int nb_subbands);
|
uint16_t quantize_subband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id,int nb_subbands);
|
||||||
|
|
||||||
|
int32_t pmi_convert_rank1_from_rank2(uint16_t pmi_alloc, int tpmi, int nb_rb);
|
||||||
|
|
||||||
//uint16_t quantize_subband_pmi2(PHY_MEASUREMENTS *meas,uint8_t eNB_id,uint8_t a_id,int nb_subbands);
|
//uint16_t quantize_subband_pmi2(PHY_MEASUREMENTS *meas,uint8_t eNB_id,uint8_t a_id,int nb_subbands);
|
||||||
|
|
||||||
uint64_t pmi2hex_2Ar1(uint32_t pmi);
|
uint64_t pmi2hex_2Ar1(uint32_t pmi);
|
||||||
@@ -1759,11 +1761,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);
|
||||||
|
|
||||||
@@ -1825,15 +1827,15 @@ 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,
|
||||||
eNB_rxtx_proc_t *proc,
|
eNB_rxtx_proc_t *proc,
|
||||||
@@ -1843,7 +1845,6 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB,
|
|||||||
uint8_t *payload);
|
uint8_t *payload);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Check for PRACH TXop in subframe
|
\brief Check for PRACH TXop in subframe
|
||||||
@param frame_parms Pointer to LTE_DL_FRAME_PARMS
|
@param frame_parms Pointer to LTE_DL_FRAME_PARMS
|
||||||
@@ -1935,18 +1936,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,
|
||||||
|
|||||||
+12
-1
@@ -559,7 +559,7 @@ typedef struct PHY_VARS_eNB_s {
|
|||||||
uint32_t total_transmitted_bits;
|
uint32_t total_transmitted_bits;
|
||||||
uint32_t total_system_throughput;
|
uint32_t total_system_throughput;
|
||||||
|
|
||||||
int hw_timing_advance;
|
int hw_timing_advance;
|
||||||
|
|
||||||
time_stats_t phy_proc;
|
time_stats_t phy_proc;
|
||||||
time_stats_t phy_proc_tx;
|
time_stats_t phy_proc_tx;
|
||||||
@@ -870,6 +870,17 @@ typedef struct {
|
|||||||
|
|
||||||
/// RF and Interface devices per CC
|
/// RF and Interface devices per CC
|
||||||
openair0_device rfdevice;
|
openair0_device rfdevice;
|
||||||
|
time_stats_t dlsch_encoding_SIC_stats;
|
||||||
|
time_stats_t dlsch_scrambling_SIC_stats;
|
||||||
|
time_stats_t dlsch_modulation_SIC_stats;
|
||||||
|
time_stats_t dlsch_llr_stripping_unit_SIC_stats;
|
||||||
|
time_stats_t dlsch_unscrambling_SIC_stats;
|
||||||
|
|
||||||
|
#if ENABLE_RAL
|
||||||
|
hash_table_t *ral_thresholds_timed;
|
||||||
|
SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
|
||||||
|
SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
|
||||||
|
#endif
|
||||||
|
|
||||||
} PHY_VARS_UE;
|
} PHY_VARS_UE;
|
||||||
|
|
||||||
|
|||||||
Regular → Executable
+2
-2
@@ -819,7 +819,7 @@ typedef struct {
|
|||||||
/// \brief Magnitude of Downlink Channel second layer (16QAM level/First 64QAM level).
|
/// \brief Magnitude of Downlink Channel second layer (16QAM level/First 64QAM level).
|
||||||
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
||||||
/// - second index: ? [0..168*N_RB_DL[
|
/// - second index: ? [0..168*N_RB_DL[
|
||||||
int32_t **dl_ch_mag1;
|
int32_t **dl_ch_mag1[8][8];
|
||||||
/// \brief Magnitude of Downlink Channel, first layer (2nd 64QAM level).
|
/// \brief Magnitude of Downlink Channel, first layer (2nd 64QAM level).
|
||||||
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
||||||
/// - second index: ? [0..168*N_RB_DL[
|
/// - second index: ? [0..168*N_RB_DL[
|
||||||
@@ -827,7 +827,7 @@ typedef struct {
|
|||||||
/// \brief Magnitude of Downlink Channel second layer (2nd 64QAM level).
|
/// \brief Magnitude of Downlink Channel second layer (2nd 64QAM level).
|
||||||
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
||||||
/// - second index: ? [0..168*N_RB_DL[
|
/// - second index: ? [0..168*N_RB_DL[
|
||||||
int32_t **dl_ch_magb1;
|
int32_t **dl_ch_magb1[8][8];
|
||||||
/// \brief Cross-correlation of two eNB signals.
|
/// \brief Cross-correlation of two eNB signals.
|
||||||
/// - first index: rx antenna [0..nb_antennas_rx[
|
/// - first index: rx antenna [0..nb_antennas_rx[
|
||||||
/// - second index: symbol [0..]
|
/// - second index: symbol [0..]
|
||||||
|
|||||||
+1241
-614
File diff suppressed because it is too large
Load Diff
@@ -183,6 +183,9 @@ typedef enum {
|
|||||||
Rayleigh8_orth_eff_ch_TM4_prec_real,
|
Rayleigh8_orth_eff_ch_TM4_prec_real,
|
||||||
Rayleigh8_orth_eff_ch_TM4_prec_imag,
|
Rayleigh8_orth_eff_ch_TM4_prec_imag,
|
||||||
TS_SHIFT,
|
TS_SHIFT,
|
||||||
|
EPA_low,
|
||||||
|
EPA_medium,
|
||||||
|
EPA_high,
|
||||||
} SCM_t;
|
} SCM_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
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