Commit 583123e0 authored by Cedric Roux's avatar Cedric Roux
Browse files

bugfix/compilation warning removal in dlsim

parent 53bb6a8c
...@@ -270,7 +270,7 @@ void fill_DCI(PHY_VARS_eNB *eNB, ...@@ -270,7 +270,7 @@ void fill_DCI(PHY_VARS_eNB *eNB,
int *num_dci) { int *num_dci) {
int k; int k;
int dci_length,dci_length_bytes; int dci_length = -1,dci_length_bytes = -1;
// printf("Generating DCIs for %d users, TM %d, mcs1 %d\n",n_users,transmission_mode,mcs1); // printf("Generating DCIs for %d users, TM %d, mcs1 %d\n",n_users,transmission_mode,mcs1);
for(k=0; k<n_users; k++) { for(k=0; k<n_users; k++) {
...@@ -1227,12 +1227,13 @@ DCI_PDU *get_dci_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t ...@@ -1227,12 +1227,13 @@ DCI_PDU *get_dci_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t
DCI_pdu.Num_ue_spec_dci = num_ue_spec_dci; DCI_pdu.Num_ue_spec_dci = num_ue_spec_dci;
DCI_pdu.Num_common_dci = num_common_dci; DCI_pdu.Num_common_dci = num_common_dci;
DCI_pdu.num_pdcch_symbols = num_pdcch_symbols; DCI_pdu.num_pdcch_symbols = num_pdcch_symbols;
return(&DCI_pdu);
} else { } else {
DCI_pdu.Num_ue_spec_dci = 0; DCI_pdu.Num_ue_spec_dci = 0;
DCI_pdu.Num_common_dci = 0; DCI_pdu.Num_common_dci = 0;
DCI_pdu.num_pdcch_symbols = num_pdcch_symbols; DCI_pdu.num_pdcch_symbols = num_pdcch_symbols;
} }
return &DCI_pdu;
} }
void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, uint8_t cooperation_flag, frame_t frameP, sub_frame_t subframeP) { void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, uint8_t cooperation_flag, frame_t frameP, sub_frame_t subframeP) {
...@@ -1268,7 +1269,7 @@ int main(int argc, char **argv) ...@@ -1268,7 +1269,7 @@ int main(int argc, char **argv)
int s,Kr,Kr_bytes; int s,Kr,Kr_bytes;
double SNR,snr0=-2.0,snr1,rate; double SNR,snr0=-2.0,snr1,rate = 0;
double snr_step=1,input_snr_step=1, snr_int=30; double snr_step=1,input_snr_step=1, snr_int=30;
LTE_DL_FRAME_PARMS *frame_parms; LTE_DL_FRAME_PARMS *frame_parms;
...@@ -1298,10 +1299,10 @@ int main(int argc, char **argv) ...@@ -1298,10 +1299,10 @@ int main(int argc, char **argv)
DCI_ALLOC_t *dci_alloc = &DCI_pdu.dci_alloc[0]; DCI_ALLOC_t *dci_alloc = &DCI_pdu.dci_alloc[0];
unsigned int ret; unsigned int ret;
unsigned int coded_bits_per_codeword=0,nsymb,tbs=0; unsigned int coded_bits_per_codeword=0,nsymb; //,tbs=0;
unsigned int tx_lev=0,tx_lev_dB=0,trials,errs[4]= {0,0,0,0},errs2[4]= {0,0,0,0},round_trials[4]= {0,0,0,0},dci_errors=0;//,num_layers; unsigned int tx_lev=0,tx_lev_dB=0,trials,errs[4]= {0,0,0,0},errs2[4]= {0,0,0,0},round_trials[4]= {0,0,0,0},dci_errors=0;//,num_layers;
int re_allocated; //int re_allocated;
char fname[32],vname[32]; char fname[32],vname[32];
FILE *bler_fd; FILE *bler_fd;
char bler_fname[256]; char bler_fname[256];
...@@ -1328,16 +1329,16 @@ int main(int argc, char **argv) ...@@ -1328,16 +1329,16 @@ int main(int argc, char **argv)
int n_frames; int n_frames;
int n_ch_rlz = 1; int n_ch_rlz = 1;
channel_desc_t *eNB2UE[4]; channel_desc_t *eNB2UE[4];
uint8_t num_pdcch_symbols_2=0; //uint8_t num_pdcch_symbols_2=0;
uint8_t rx_sample_offset = 0; uint8_t rx_sample_offset = 0;
//char stats_buffer[4096]; //char stats_buffer[4096];
//int len; //int len;
uint8_t num_rounds = 4;//,fix_rounds=0; uint8_t num_rounds = 4;//,fix_rounds=0;
int u; //int u;
int n=0; int n=0;
int abstx=0; int abstx=0;
int iii; //int iii;
int ch_realization; int ch_realization;
int pmi_feedback=0; int pmi_feedback=0;
...@@ -1346,7 +1347,7 @@ int main(int argc, char **argv) ...@@ -1346,7 +1347,7 @@ int main(int argc, char **argv)
// void *data; // void *data;
// int ii; // int ii;
// int bler; // int bler;
double blerr[4],uncoded_ber,avg_ber; double blerr[4],uncoded_ber; //,avg_ber;
short *uncoded_ber_bit=NULL; short *uncoded_ber_bit=NULL;
uint8_t N_RB_DL=25,osf=1; uint8_t N_RB_DL=25,osf=1;
frame_t frame_type = FDD; frame_t frame_type = FDD;
...@@ -1355,7 +1356,7 @@ int main(int argc, char **argv) ...@@ -1355,7 +1356,7 @@ int main(int argc, char **argv)
char title[255]; char title[255];
int numCCE=0; int numCCE=0;
int dci_length_bytes=0,dci_length=0; //int dci_length_bytes=0,dci_length=0;
//double channel_bandwidth = 5.0, sampling_rate=7.68; //double channel_bandwidth = 5.0, sampling_rate=7.68;
int common_flag=0,TPC=0; int common_flag=0,TPC=0;
...@@ -1391,7 +1392,7 @@ int main(int argc, char **argv) ...@@ -1391,7 +1392,7 @@ int main(int argc, char **argv)
char csv_fname[32]; char csv_fname[32];
int dci_flag=1; int dci_flag=1;
int two_thread_flag=0; int two_thread_flag=0;
int DLSCH_RB_ALLOC; int DLSCH_RB_ALLOC = 0;
#if defined(__arm__) #if defined(__arm__)
FILE *proc_fd = NULL; FILE *proc_fd = NULL;
...@@ -1828,6 +1829,8 @@ int main(int argc, char **argv) ...@@ -1828,6 +1829,8 @@ int main(int argc, char **argv)
} }
else { else {
eNB->te = dlsch_encoding_2threads; eNB->te = dlsch_encoding_2threads;
extern void init_td_thread(PHY_VARS_eNB *, pthread_attr_t *);
extern void init_te_thread(PHY_VARS_eNB *, pthread_attr_t *);
init_td_thread(eNB,NULL); init_td_thread(eNB,NULL);
init_te_thread(eNB,NULL); init_te_thread(eNB,NULL);
} }
...@@ -2186,6 +2189,7 @@ int main(int argc, char **argv) ...@@ -2186,6 +2189,7 @@ int main(int argc, char **argv)
while ((!feof(input_trch_fd)) && (i<input_buffer_length0<<3)) { while ((!feof(input_trch_fd)) && (i<input_buffer_length0<<3)) {
ret=fscanf(input_trch_fd,"%s",input_trch_val); ret=fscanf(input_trch_fd,"%s",input_trch_val);
if (ret != 1) printf("ERROR: error reading file\n");
if (input_trch_val[0] == '1') if (input_trch_val[0] == '1')
input_buffer0[k][i>>3]+=(1<<(7-(i&7))); input_buffer0[k][i>>3]+=(1<<(7-(i&7)));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment