integration: cleanup
- remove spaces at the end of lines - remove useless dead code use: git show -p <this commit> -w to see it clearly
This commit is contained in:
@@ -254,9 +254,9 @@ void DL_channel(RU_t *ru,PHY_VARS_UE *UE,uint subframe,int awgn_flag,double SNR,
|
||||
|
||||
uint16_t
|
||||
fill_tx_req(nfapi_tx_request_body_t *tx_req_body,
|
||||
uint16_t absSF,
|
||||
uint16_t absSF,
|
||||
uint16_t pdu_length,
|
||||
uint16_t pdu_index,
|
||||
uint16_t pdu_index,
|
||||
uint8_t *pdu)
|
||||
{
|
||||
nfapi_tx_request_pdu_t *TX_req = &tx_req_body->tx_pdu_list[tx_req_body->number_of_pdus];
|
||||
@@ -384,7 +384,7 @@ void fill_DCI(PHY_VARS_eNB *eNB,
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = n_rnti+k;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
|
||||
|
||||
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = TPC; // dont adjust power when retransmitting
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = ndi;
|
||||
@@ -403,14 +403,14 @@ void fill_DCI(PHY_VARS_eNB *eNB,
|
||||
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
||||
|
||||
|
||||
fill_dlsch_config(dl_req,
|
||||
get_TBS_DL(mcs1,NB_RB),
|
||||
fill_dlsch_config(dl_req,
|
||||
get_TBS_DL(mcs1,NB_RB),
|
||||
(retrans > 0) ? -1 : 0, /* retransmission, no pdu_index */
|
||||
n_rnti,
|
||||
n_rnti,
|
||||
0, // type 0 allocation from 7.1.6 in 36.213
|
||||
0, // virtual_resource_block_assignment_flag, unused here
|
||||
DLSCH_RB_ALLOC, // resource_block_coding,
|
||||
get_Qm(mcs1),
|
||||
DLSCH_RB_ALLOC, // resource_block_coding,
|
||||
get_Qm(mcs1),
|
||||
rv, // redundancy version
|
||||
1, // transport blocks
|
||||
0, // transport block to codeword swap flag
|
||||
@@ -419,7 +419,7 @@ void fill_DCI(PHY_VARS_eNB *eNB,
|
||||
1, // number of subbands
|
||||
// uint8_t codebook_index,
|
||||
4, // UE category capacity
|
||||
pa, // pa
|
||||
pa, // pa
|
||||
0, // delta_power_offset for TM5
|
||||
0, // ngap
|
||||
0, // nprb
|
||||
@@ -429,7 +429,7 @@ void fill_DCI(PHY_VARS_eNB *eNB,
|
||||
);
|
||||
fill_tx_req(TX_req,
|
||||
(frame * 10) + subframe,
|
||||
get_TBS_DL(mcs1,NB_RB),
|
||||
get_TBS_DL(mcs1,NB_RB),
|
||||
0,
|
||||
input_buffer[k]);
|
||||
}
|
||||
@@ -441,26 +441,26 @@ void fill_DCI(PHY_VARS_eNB *eNB,
|
||||
|
||||
case 3:
|
||||
if (common_flag == 0) {
|
||||
|
||||
|
||||
if (eNB->frame_parms.nb_antennas_tx == 2) {
|
||||
|
||||
|
||||
if (eNB->frame_parms.frame_type == TDD) {
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 4:
|
||||
if (common_flag == 0) {
|
||||
|
||||
|
||||
if (eNB->frame_parms.nb_antennas_tx == 2) {
|
||||
|
||||
|
||||
if (eNB->frame_parms.frame_type == TDD) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -564,7 +564,7 @@ int main(int argc, char **argv)
|
||||
// char input_val_str[50],input_val_str2[50];
|
||||
|
||||
char input_trch_val[16];
|
||||
|
||||
|
||||
// unsigned char pbch_pdu[6];
|
||||
|
||||
|
||||
@@ -651,7 +651,7 @@ int main(int argc, char **argv)
|
||||
nfapi_dl_config_request_t DL_req;
|
||||
nfapi_ul_config_request_t UL_req;
|
||||
nfapi_hi_dci0_request_t HI_DCI0_req;
|
||||
nfapi_dl_config_request_pdu_t dl_config_pdu_list[MAX_NUM_DL_PDU];
|
||||
nfapi_dl_config_request_pdu_t dl_config_pdu_list[MAX_NUM_DL_PDU];
|
||||
nfapi_tx_request_pdu_t tx_pdu_list[MAX_NUM_TX_REQUEST_PDU];
|
||||
nfapi_tx_request_t TX_req;
|
||||
Sched_Rsp_t sched_resp;
|
||||
@@ -1155,7 +1155,7 @@ int main(int argc, char **argv)
|
||||
|
||||
uint8_t input_buffer[NUMBER_OF_UE_MAX][20000];
|
||||
|
||||
for (i=0;i<n_users;i++)
|
||||
for (i=0;i<n_users;i++)
|
||||
for (j=0;j<20000;j++) input_buffer[i][j] = (uint8_t)((taus())&255);
|
||||
|
||||
frame_parms = &eNB->frame_parms;
|
||||
@@ -1585,7 +1585,7 @@ int main(int argc, char **argv)
|
||||
(TB0_active==1)?mcs1:0,mcs2,!(trials&1),(TB0_active==1)?round&3:0,pa,&num_common_dci,&num_ue_spec_dci,&num_dci);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc_eNB->subframe_tx = subframe;
|
||||
sched_resp.subframe=subframe;
|
||||
sched_resp.frame=proc_eNB->frame_tx;
|
||||
@@ -1610,7 +1610,7 @@ int main(int argc, char **argv)
|
||||
0,
|
||||
subframe,
|
||||
transmission_mode>=7?transmission_mode:0);
|
||||
|
||||
|
||||
uncoded_ber_bit = (short*) malloc(sizeof(short)*coded_bits_per_codeword);
|
||||
printf("uncoded_ber_bit=%p\n",uncoded_ber_bit);
|
||||
}
|
||||
@@ -1736,13 +1736,13 @@ int main(int argc, char **argv)
|
||||
|
||||
write_output("pdcch_rxF_comp0.m","pdcch0_rxF_comp0",UE->pdcch_vars[0][eNB_id]->rxdataF_comp[0],4*300,1,1);
|
||||
write_output("pdcch_rxF_llr.m","pdcch_llr",UE->pdcch_vars[0][eNB_id]->llr,2400,1,4);
|
||||
|
||||
|
||||
write_output("rxsig0.m","rxs0", &UE->common_vars.rxdata[0][0],10*UE->frame_parms.samples_per_tti,1,1);
|
||||
write_output("rxsigF0.m","rxsF0", &UE->common_vars.common_vars_rx_data_per_thread[UE->current_thread_id[subframe]].rxdataF[0][0],UE->frame_parms.ofdm_symbol_size*nsymb,1,1);
|
||||
|
||||
|
||||
|
||||
exit(-1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
int bit_errors=0;
|
||||
@@ -1755,9 +1755,9 @@ int main(int argc, char **argv)
|
||||
UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0],
|
||||
0,
|
||||
subframe<<1);
|
||||
for (i=0;i<coded_bits_per_codeword;i++)
|
||||
for (i=0;i<coded_bits_per_codeword;i++)
|
||||
if ((eNB->dlsch[0][0]->harq_processes[0]->e[i]==1 && UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0][i] > 0)||
|
||||
(eNB->dlsch[0][0]->harq_processes[0]->e[i]==0 && UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0][i] < 0)) {
|
||||
(eNB->dlsch[0][0]->harq_processes[0]->e[i]==0 && UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0][i] < 0)) {
|
||||
uncoded_ber_bit[bit_errors++] = 1;
|
||||
printf("error in pos %d : %d => %d\n",i,
|
||||
eNB->dlsch[0][0]->harq_processes[0]->e[i],
|
||||
@@ -1770,10 +1770,10 @@ int main(int argc, char **argv)
|
||||
UE->pdsch_vars[UE->current_thread_id[subframe]][0]->llr[0][i]);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
write_output("dlsch_ber_bit.m","ber_bit",uncoded_ber_bit,coded_bits_per_codeword,1,0);
|
||||
write_output("ch0.m","ch0",eNB2UE[0]->ch[0],eNB2UE[0]->channel_length,1,8);
|
||||
|
||||
|
||||
if (eNB->frame_parms.nb_antennas_tx>1)
|
||||
write_output("ch1.m","ch1",eNB2UE[0]->ch[eNB->frame_parms.nb_antennas_rx],eNB2UE[0]->channel_length,1,8);
|
||||
|
||||
@@ -2488,7 +2488,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (test_perf && !test_passed)
|
||||
return(-1);
|
||||
else
|
||||
else
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -84,20 +84,20 @@ extern void ru_fep_full_2thread(RU_t *ru);
|
||||
nfapi_dl_config_request_t DL_req;
|
||||
nfapi_ul_config_request_t UL_req;
|
||||
nfapi_hi_dci0_request_t HI_DCI0_req;
|
||||
nfapi_ul_config_request_pdu_t ul_config_pdu_list[MAX_NUM_DL_PDU];
|
||||
nfapi_ul_config_request_pdu_t ul_config_pdu_list[MAX_NUM_DL_PDU];
|
||||
nfapi_tx_request_pdu_t tx_pdu_list[MAX_NUM_TX_REQUEST_PDU];
|
||||
nfapi_tx_request_t TX_req;
|
||||
Sched_Rsp_t sched_resp;
|
||||
|
||||
void
|
||||
fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu,
|
||||
fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu,
|
||||
uint8_t cqi_req,
|
||||
uint8_t p_eNB,
|
||||
uint8_t cqi_ReportModeAperiodic,
|
||||
uint8_t betaOffset_CQI_Index,
|
||||
uint8_t betaOffset_RI_Index,
|
||||
uint8_t dl_cqi_pmi_size,
|
||||
uint8_t tmode,
|
||||
uint8_t tmode,
|
||||
uint32_t handle,
|
||||
uint16_t rnti,
|
||||
uint8_t resource_block_start,
|
||||
@@ -111,7 +111,7 @@ fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu,
|
||||
uint8_t harq_process_number,
|
||||
uint8_t ul_tx_mode,
|
||||
uint8_t current_tx_nb,
|
||||
uint8_t n_srs,
|
||||
uint8_t n_srs,
|
||||
uint16_t size)
|
||||
{
|
||||
memset((void *) ul_config_pdu, 0, sizeof(nfapi_ul_config_request_pdu_t));
|
||||
@@ -152,11 +152,11 @@ fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu,
|
||||
else if (p_eNB <= 2) ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size = 0;
|
||||
else if (p_eNB == 4) ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size = 2;
|
||||
|
||||
for (int ri = 0;
|
||||
ri < (1 << ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size);
|
||||
for (int ri = 0;
|
||||
ri < (1 << ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size);
|
||||
ri++)
|
||||
ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].dl_cqi_pmi_size[ri] = dl_cqi_pmi_size;
|
||||
|
||||
|
||||
ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.delta_offset_cqi = betaOffset_CQI_Index;
|
||||
ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.delta_offset_ri = betaOffset_RI_Index;
|
||||
}
|
||||
@@ -263,17 +263,17 @@ void fill_ulsch_dci(PHY_VARS_eNB *eNB,
|
||||
break;
|
||||
}
|
||||
|
||||
fill_nfapi_ulsch_config_request(&ul_req->ul_config_pdu_list[0],
|
||||
cqi_flag&1,
|
||||
fill_nfapi_ulsch_config_request(&ul_req->ul_config_pdu_list[0],
|
||||
cqi_flag&1,
|
||||
1, // p_eNB
|
||||
0, // reportmode Aperiodic
|
||||
beta_CQI,
|
||||
beta_RI,
|
||||
cqi_size,
|
||||
//cc,
|
||||
//UE_template->physicalConfigDedicated,
|
||||
//cc,
|
||||
//UE_template->physicalConfigDedicated,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
14, // rnti
|
||||
first_rb, // resource_block_start
|
||||
nb_rb, // number_of_resource_blocks
|
||||
@@ -292,7 +292,7 @@ void fill_ulsch_dci(PHY_VARS_eNB *eNB,
|
||||
sched_resp->UL_req->header.message_id = NFAPI_UL_CONFIG_REQUEST;
|
||||
ul_req->number_of_pdus=1;
|
||||
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
|
||||
|
||||
|
||||
}
|
||||
|
||||
extern void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc);
|
||||
@@ -740,7 +740,7 @@ int main(int argc, char **argv)
|
||||
for (int k=0;k<eNB->RU_list[0]->nb_rx;k++) eNB->common_vars.rxdataF[k] = eNB->RU_list[0]->common.rxdataF[k];
|
||||
|
||||
memset((void*)&eNB->UL_INFO,0,sizeof(eNB->UL_INFO));
|
||||
|
||||
|
||||
printf("Setting indication lists\n");
|
||||
eNB->UL_INFO.rx_ind.rx_indication_body.rx_pdu_list = eNB->rx_pdu_list;
|
||||
eNB->UL_INFO.crc_ind.crc_indication_body.crc_pdu_list = eNB->crc_pdu_list;
|
||||
@@ -922,7 +922,7 @@ int main(int argc, char **argv)
|
||||
|
||||
|
||||
UE->mac_enabled=0;
|
||||
|
||||
|
||||
eNB_rxtx_proc_t *proc_rxtx = &eNB->proc.proc_rxtx[subframe&1];
|
||||
UE_rxtx_proc_t *proc_rxtx_ue = &UE->proc.proc_rxtx[subframe&1];
|
||||
proc_rxtx->frame_rx=1;
|
||||
@@ -1102,7 +1102,7 @@ int main(int argc, char **argv)
|
||||
reset_meas(&eNB->ulsch_tc_intl1_stats);
|
||||
reset_meas(&eNB->ulsch_tc_intl2_stats);
|
||||
|
||||
// initialization
|
||||
// initialization
|
||||
struct list time_vector_tx;
|
||||
initialize(&time_vector_tx);
|
||||
struct list time_vector_tx_ifft;
|
||||
@@ -1137,10 +1137,10 @@ int main(int argc, char **argv)
|
||||
while (round < 4) {
|
||||
proc_rxtx->frame_rx=1;
|
||||
proc_rxtx->subframe_rx=subframe;
|
||||
|
||||
|
||||
proc_rxtx->frame_tx=pdcch_alloc2ul_frame(&eNB->frame_parms,1,subframe);
|
||||
proc_rxtx->subframe_tx=pdcch_alloc2ul_subframe(&eNB->frame_parms,subframe);
|
||||
|
||||
|
||||
proc_rxtx_ue->frame_tx = proc_rxtx->frame_rx;
|
||||
proc_rxtx_ue->frame_rx = (subframe<4)?(proc_rxtx->frame_tx-1):(proc_rxtx->frame_tx);
|
||||
proc_rxtx_ue->subframe_tx = proc_rxtx->subframe_rx;
|
||||
@@ -1158,7 +1158,7 @@ int main(int argc, char **argv)
|
||||
if (mcs < 11) modulation_type = 2;
|
||||
else if (mcs < 21) modulation_type = 4;
|
||||
else if (mcs < 29) modulation_type = 6;
|
||||
|
||||
|
||||
fill_ulsch_dci(eNB,proc_rxtx->frame_rx,subframe,&sched_resp,14,(void*)&UL_alloc_pdu,first_rb,nb_rb,(round==0)?mcs:(28+rvidx[round]),modulation_type,ndi,cqi_flag,beta_CQI,beta_RI,cqi_size);
|
||||
|
||||
UE->ulsch_Msg3_active[eNB_id] = 0;
|
||||
@@ -1216,16 +1216,16 @@ int main(int argc, char **argv)
|
||||
|
||||
tx_lev = signal_energy(&UE->common_vars.txdata[0][eNB->frame_parms.samples_per_tti*subframe],
|
||||
eNB->frame_parms.samples_per_tti);
|
||||
|
||||
|
||||
|
||||
|
||||
if (n_frames==1) {
|
||||
write_output("txsigF0UL.m","txsF0", &UE->common_vars.txdataF[0][eNB->frame_parms.ofdm_symbol_size*nsymb*subframe],eNB->frame_parms.ofdm_symbol_size*nsymb,1,
|
||||
1);
|
||||
//write_output("txsigF1.m","txsF1", UE->common_vars.txdataF[0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1);
|
||||
}
|
||||
|
||||
|
||||
} // input_fd == NULL
|
||||
|
||||
|
||||
tx_lev_dB = (unsigned int) dB_fixed_times10(tx_lev);
|
||||
|
||||
if (n_frames==1) {
|
||||
@@ -1337,7 +1337,7 @@ int main(int argc, char **argv)
|
||||
ru->feprx = (parallel_flag == 1) ? ru_fep_full_2thread : fep_full;
|
||||
eNB->td = (parallel_flag == 1) ? ulsch_decoding_data_2thread : ulsch_decoding_data;
|
||||
|
||||
|
||||
|
||||
ru->feprx(ru);
|
||||
phy_procedures_eNB_uespec_RX(eNB,proc_rxtx,no_relay);
|
||||
|
||||
@@ -1371,10 +1371,10 @@ int main(int argc, char **argv)
|
||||
|
||||
// printf("ulsch_coding: O[%d] %d\n",i,o_flip[i]);
|
||||
|
||||
|
||||
|
||||
// if (ret <= eNB->ulsch[0]->max_turbo_iterations) {
|
||||
|
||||
if (eNB->ulsch[0]->harq_processes[harq_pid]->status == SCH_IDLE) {
|
||||
|
||||
if (eNB->ulsch[0]->harq_processes[harq_pid]->status == SCH_IDLE) {
|
||||
|
||||
// avg_iter += ret;
|
||||
iter_trials++;
|
||||
@@ -1425,7 +1425,7 @@ int main(int argc, char **argv)
|
||||
if (n_frames==1) {
|
||||
printf("ULSCH in error in round %d\n",round);
|
||||
}
|
||||
} // ulsch error
|
||||
} // ulsch error
|
||||
|
||||
} // round
|
||||
|
||||
|
||||
Reference in New Issue
Block a user