Commit 111c43ac authored by Raymond Knopp's avatar Raymond Knopp

removed ambiguous 32/64-bit types in enb_config.c, lte-softmodem updates for CCids

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5743 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 1c37b52f
...@@ -325,83 +325,83 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -325,83 +325,83 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
int i; int i;
int j; int j;
int parse_errors = 0; int parse_errors = 0;
long int enb_id = 0; int enb_id = 0;
const char* cell_type = NULL; const char* cell_type = NULL;
const char* tac = 0; const char* tac = 0;
const char* enb_name = NULL; const char* enb_name = NULL;
const char* mcc = 0; const char* mcc = 0;
const char* mnc = 0; const char* mnc = 0;
const char* frame_type; const char* frame_type;
long int tdd_config; int tdd_config;
long int tdd_config_s; int tdd_config_s;
const char* prefix_type; const char* prefix_type;
long int eutra_band; int eutra_band;
long long int downlink_frequency; int64_t downlink_frequency;
long int uplink_frequency_offset; int uplink_frequency_offset;
long int Nid_cell; int Nid_cell;
long int Nid_cell_mbsfn; int Nid_cell_mbsfn;
long int N_RB_DL; int N_RB_DL;
long int nb_antennas_tx; int nb_antennas_tx;
long int nb_antennas_rx; int nb_antennas_rx;
long int prach_root; int prach_root;
long int prach_config_index; int prach_config_index;
const char* prach_high_speed; const char* prach_high_speed;
long int prach_zero_correlation; int prach_zero_correlation;
long int prach_freq_offset; int prach_freq_offset;
long int pucch_delta_shift; int pucch_delta_shift;
long int pucch_nRB_CQI; int pucch_nRB_CQI;
long int pucch_nCS_AN; int pucch_nCS_AN;
#ifndef Rel10 #ifndef Rel10
long int pucch_n1_AN; int pucch_n1_AN;
#endif #endif
long int pdsch_referenceSignalPower; int pdsch_referenceSignalPower;
long int pdsch_p_b; int pdsch_p_b;
long int pusch_n_SB; int pusch_n_SB;
const char * pusch_hoppingMode; const char * pusch_hoppingMode;
long int pusch_hoppingOffset; int pusch_hoppingOffset;
const char* pusch_enable64QAM; const char* pusch_enable64QAM;
const char* pusch_groupHoppingEnabled; const char* pusch_groupHoppingEnabled;
long int pusch_groupAssignment; int pusch_groupAssignment;
const char* pusch_sequenceHoppingEnabled; const char* pusch_sequenceHoppingEnabled;
long int pusch_nDMRS1; int pusch_nDMRS1;
const char* phich_duration; const char* phich_duration;
const char* phich_resource; const char* phich_resource;
const char* srs_enable; const char* srs_enable;
long int srs_BandwidthConfig; int srs_BandwidthConfig;
long int srs_SubframeConfig; int srs_SubframeConfig;
const char* srs_ackNackST; const char* srs_ackNackST;
const char* srs_MaxUpPts; const char* srs_MaxUpPts;
long int pusch_p0_Nominal; int pusch_p0_Nominal;
const char* pusch_alpha; const char* pusch_alpha;
long int pucch_p0_Nominal; int pucch_p0_Nominal;
long int msg3_delta_Preamble; int msg3_delta_Preamble;
long int ul_CyclicPrefixLength; int ul_CyclicPrefixLength;
const char* pucch_deltaF_Format1; const char* pucch_deltaF_Format1;
const char* pucch_deltaF_Format1a; const char* pucch_deltaF_Format1a;
const char* pucch_deltaF_Format1b; const char* pucch_deltaF_Format1b;
const char* pucch_deltaF_Format2; const char* pucch_deltaF_Format2;
const char* pucch_deltaF_Format2a; const char* pucch_deltaF_Format2a;
const char* pucch_deltaF_Format2b; const char* pucch_deltaF_Format2b;
long rach_numberOfRA_Preambles; int rach_numberOfRA_Preambles;
const char* rach_preamblesGroupAConfig; const char* rach_preamblesGroupAConfig;
long rach_sizeOfRA_PreamblesGroupA; int rach_sizeOfRA_PreamblesGroupA;
long rach_messageSizeGroupA; int rach_messageSizeGroupA;
const char* rach_messagePowerOffsetGroupB; const char* rach_messagePowerOffsetGroupB;
long rach_powerRampingStep; int rach_powerRampingStep;
long rach_preambleInitialReceivedTargetPower; int rach_preambleInitialReceivedTargetPower;
long rach_preambleTransMax; int rach_preambleTransMax;
long rach_raResponseWindowSize; int rach_raResponseWindowSize;
long rach_macContentionResolutionTimer; int rach_macContentionResolutionTimer;
long rach_maxHARQ_Msg3Tx; int rach_maxHARQ_Msg3Tx;
long pcch_defaultPagingCycle; int pcch_defaultPagingCycle;
const char* pcch_nB; const char* pcch_nB;
long bcch_modificationPeriodCoeff; int bcch_modificationPeriodCoeff;
long ue_TimersAndConstants_t300; int ue_TimersAndConstants_t300;
long ue_TimersAndConstants_t301; int ue_TimersAndConstants_t301;
long ue_TimersAndConstants_t310; int ue_TimersAndConstants_t310;
long ue_TimersAndConstants_t311; int ue_TimersAndConstants_t311;
long ue_TimersAndConstants_n310; int ue_TimersAndConstants_n310;
long ue_TimersAndConstants_n311; int ue_TimersAndConstants_n311;
......
...@@ -1161,7 +1161,6 @@ static void *eNB_thread(void *arg) ...@@ -1161,7 +1161,6 @@ static void *eNB_thread(void *arg)
unsigned int rx_cnt = 0; unsigned int rx_cnt = 0;
unsigned int tx_cnt = tx_delay; unsigned int tx_cnt = tx_delay;
// int tx_offset; // int tx_offset;
int CC_id;
hw_subframe = 0; hw_subframe = 0;
...@@ -1707,10 +1706,12 @@ static void get_options (int argc, char **argv) { ...@@ -1707,10 +1706,12 @@ static void get_options (int argc, char **argv) {
int c; int c;
// char line[1000]; // char line[1000];
// int l; // int l;
int i,j,k; int k;//i,j,k;
#ifdef USRP #ifdef USRP
int clock_src; int clock_src;
#endif #endif
int CC_id;
const Enb_properties_array_t *enb_properties; const Enb_properties_array_t *enb_properties;
enum long_option_e { enum long_option_e {
...@@ -1843,11 +1844,11 @@ static void get_options (int argc, char **argv) { ...@@ -1843,11 +1844,11 @@ static void get_options (int argc, char **argv) {
clock_src = atoi(optarg); clock_src = atoi(optarg);
if (clock_src == 0) { if (clock_src == 0) {
char ref[128] = "internal"; // char ref[128] = "internal";
//strncpy(uhd_ref, ref, strlen(ref)+1); //strncpy(uhd_ref, ref, strlen(ref)+1);
} }
else if (clock_src == 1) { else if (clock_src == 1) {
char ref[128] = "external"; //char ref[128] = "external";
//strncpy(uhd_ref, ref, strlen(ref)+1); //strncpy(uhd_ref, ref, strlen(ref)+1);
} }
#else #else
...@@ -1886,7 +1887,7 @@ static void get_options (int argc, char **argv) { ...@@ -1886,7 +1887,7 @@ static void get_options (int argc, char **argv) {
frame_parms[CC_id]->Ncp = enb_properties->properties[i]->prefix_type[CC_id]; frame_parms[CC_id]->Ncp = enb_properties->properties[i]->prefix_type[CC_id];
//for (j=0; j < enb_properties->properties[i]->nb_cc; j++ ){ //for (j=0; j < enb_properties->properties[i]->nb_cc; j++ ){
frame_parms[CC_id]->Nid_cell = enb_properties->properties[i]->cell_id[CC_id]; frame_parms[CC_id]->Nid_cell = enb_properties->properties[i]->Nid_cell[CC_id];
frame_parms[CC_id]->N_RB_DL = enb_properties->properties[i]->N_RB_DL[CC_id]; frame_parms[CC_id]->N_RB_DL = enb_properties->properties[i]->N_RB_DL[CC_id];
//} // j //} // j
} }
...@@ -1910,9 +1911,9 @@ static void get_options (int argc, char **argv) { ...@@ -1910,9 +1911,9 @@ static void get_options (int argc, char **argv) {
// adjust the log // adjust the log
for (k = 0 ; k < (sizeof(downlink_frequency) / sizeof (downlink_frequency[0])); k++) { for (k = 0 ; k < (sizeof(downlink_frequency) / sizeof (downlink_frequency[0])); k++) {
downlink_frequency[k] = enb_properties->properties[i]->downlink_frequency; downlink_frequency[k] = enb_properties->properties[i]->downlink_frequency[0];
printf("Downlink frequency set to %u\n", downlink_frequency[k]); printf("Downlink frequency set to %u\n", downlink_frequency[k]);
uplink_frequency_offset[k] = enb_properties->properties[i]->uplink_frequency_offset; uplink_frequency_offset[k] = enb_properties->properties[i]->uplink_frequency_offset[0];
} // k } // k
}// i }// i
} }
...@@ -2104,9 +2105,9 @@ int main(int argc, char **argv) { ...@@ -2104,9 +2105,9 @@ int main(int argc, char **argv) {
frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 0; frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 0;
frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0; frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0;
frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = 0; frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = 0;
init_ul_hopping(frame_parms); init_ul_hopping(frame_parms[CC_id]);
init_frame_parms(frame_parms,1); init_frame_parms(frame_parms[CC_id],1);
} }
phy_init_top(frame_parms[0]); phy_init_top(frame_parms[0]);
...@@ -2244,7 +2245,7 @@ int main(int argc, char **argv) { ...@@ -2244,7 +2245,7 @@ int main(int argc, char **argv) {
#endif #endif
} }
else if(frame_parms[0]->N_RB_DL == 50){ else if(frame_parms[0]->N_RB_DL == 50){
sample_rate = 15.36es6; sample_rate = 15.36e6;
#ifdef USRP #ifdef USRP
samples_per_packets = 2048; samples_per_packets = 2048;
samples_per_frame = 153600; samples_per_frame = 153600;
...@@ -2297,7 +2298,7 @@ int main(int argc, char **argv) { ...@@ -2297,7 +2298,7 @@ int main(int argc, char **argv) {
#ifdef OPENAIR2 #ifdef OPENAIR2
int eMBMS_active=0; int eMBMS_active=0;
l2_init(frame_parms,eMBMS_active, l2_init(frame_parms[0],eMBMS_active,
0,// cba_group_active 0,// cba_group_active
0); // HO flag 0); // HO flag
if (UE_flag == 1) if (UE_flag == 1)
...@@ -2340,18 +2341,18 @@ int main(int argc, char **argv) { ...@@ -2340,18 +2341,18 @@ int main(int argc, char **argv) {
// connect the TX/RX buffers // connect the TX/RX buffers
if (UE_flag==1) { if (UE_flag==1) {
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) { for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
setup_ue_buffers(PHY_vars_UE_g[CC_id][0],frame_parms,ant_offset); setup_ue_buffers(PHY_vars_UE_g[CC_id][0],frame_parms[CC_id],ant_offset);
printf("Setting UE buffer to all-RX\n"); printf("Setting UE buffer to all-RX\n");
// Set LSBs for antenna switch (ExpressMIMO) // Set LSBs for antenna switch (ExpressMIMO)
for (i=0; i<frame_parms[CC_id]->samples_per_tti*10; i++) for (i=0; i<frame_parms[CC_id]->samples_per_tti*10; i++)
for (aa=0; aa<frame_parms[CC_id]]->nb_antennas_tx; aa++) for (aa=0; aa<frame_parms[CC_id]->nb_antennas_tx; aa++)
PHY_vars_UE_g[CC_id][0]->lte_ue_common_vars.txdata[aa][i] = 0x00010001; PHY_vars_UE_g[CC_id][0]->lte_ue_common_vars.txdata[aa][i] = 0x00010001;
} }
//p_exmimo_config->framing.tdd_config = TXRXSWITCH_TESTRX; //p_exmimo_config->framing.tdd_config = TXRXSWITCH_TESTRX;
} }
else { else {
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) { for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
setup_eNB_buffers(PHY_vars_eNB_g[CC_id][0],frame_parms,ant_offset); setup_eNB_buffers(PHY_vars_eNB_g[CC_id][0],frame_parms[CC_id],ant_offset);
printf("Setting eNB buffer to all-RX\n"); printf("Setting eNB buffer to all-RX\n");
// Set LSBs for antenna switch (ExpressMIMO) // Set LSBs for antenna switch (ExpressMIMO)
for (i=0; i<frame_parms[CC_id]->samples_per_tti*10; i++) for (i=0; i<frame_parms[CC_id]->samples_per_tti*10; i++)
...@@ -2651,7 +2652,7 @@ int main(int argc, char **argv) { ...@@ -2651,7 +2652,7 @@ int main(int argc, char **argv) {
return 0; return 0;
} }
void setup_ue_buffers(PHY_VARS_UE *phy_vars_ue, LTE_DL_FRAME_PARMS **frame_parms, int carrier) { void setup_ue_buffers(PHY_VARS_UE *phy_vars_ue, LTE_DL_FRAME_PARMS *frame_parms, int carrier) {
int i; int i;
#ifndef USRP #ifndef USRP
...@@ -2686,7 +2687,7 @@ void setup_ue_buffers(PHY_VARS_UE *phy_vars_ue, LTE_DL_FRAME_PARMS **frame_parms ...@@ -2686,7 +2687,7 @@ void setup_ue_buffers(PHY_VARS_UE *phy_vars_ue, LTE_DL_FRAME_PARMS **frame_parms
#endif #endif
} }
void setup_eNB_buffers(PHY_VARS_eNB *phy_vars_eNB, LTE_DL_FRAME_PARMS **frame_parms, int carrier) { void setup_eNB_buffers(PHY_VARS_eNB *phy_vars_eNB, LTE_DL_FRAME_PARMS *frame_parms, int carrier) {
int i; int i;
#ifdef USRP #ifdef USRP
...@@ -2696,18 +2697,18 @@ void setup_eNB_buffers(PHY_VARS_eNB *phy_vars_eNB, LTE_DL_FRAME_PARMS **frame_pa ...@@ -2696,18 +2697,18 @@ void setup_eNB_buffers(PHY_VARS_eNB *phy_vars_eNB, LTE_DL_FRAME_PARMS **frame_pa
#endif #endif
if (phy_vars_eNB) { if (phy_vars_eNB) {
if ((frame_parms[0]->nb_antennas_rx>1) && (carrier>0)) { if ((frame_parms[0].nb_antennas_rx>1) && (carrier>0)) {
printf("RX antennas > 1 and carrier > 0 not possible\n"); printf("RX antennas > 1 and carrier > 0 not possible\n");
exit(-1); exit(-1);
} }
if ((frame_parms[0]->nb_antennas_tx>1) && (carrier>0)) { if ((frame_parms[0].nb_antennas_tx>1) && (carrier>0)) {
printf("TX antennas > 1 and carrier > 0 not possible\n"); printf("TX antennas > 1 and carrier > 0 not possible\n");
exit(-1); exit(-1);
} }
#ifdef USRP #ifdef USRP
if (frame_parms[0]->frame_type == TDD) { if (frame_parms[0].frame_type == TDD) {
if (phy_vars_eNB->lte_frame_parms.N_RB_DL == 100) if (phy_vars_eNB->lte_frame_parms.N_RB_DL == 100)
N_TA_offset = 624; N_TA_offset = 624;
else if (phy_vars_eNB->lte_frame_parms.N_RB_DL == 50) else if (phy_vars_eNB->lte_frame_parms.N_RB_DL == 50)
...@@ -2740,14 +2741,14 @@ void setup_eNB_buffers(PHY_VARS_eNB *phy_vars_eNB, LTE_DL_FRAME_PARMS **frame_pa ...@@ -2740,14 +2741,14 @@ void setup_eNB_buffers(PHY_VARS_eNB *phy_vars_eNB, LTE_DL_FRAME_PARMS **frame_pa
} }
} }
#else // USRP #else // USRP
for (i=0;i<frame_parms[0]->nb_antennas_rx;i++) { for (i=0;i<frame_parms[0].nb_antennas_rx;i++) {
free(phy_vars_eNB->lte_eNB_common_vars.rxdata[0][i]); free(phy_vars_eNB->lte_eNB_common_vars.rxdata[0][i]);
rxdata = (int32_t*)malloc16(samples_per_frame*sizeof(int32_t)); rxdata = (int32_t*)malloc16(samples_per_frame*sizeof(int32_t));
phy_vars_eNB->lte_eNB_common_vars.rxdata[0][i] = rxdata-N_TA_offset; // N_TA offset for TDD phy_vars_eNB->lte_eNB_common_vars.rxdata[0][i] = rxdata-N_TA_offset; // N_TA offset for TDD
memset(rxdata, 0, samples_per_frame*sizeof(int32_t)); memset(rxdata, 0, samples_per_frame*sizeof(int32_t));
printf("rxdata[%d] @ %p (%p)\n", i, phy_vars_eNB->lte_eNB_common_vars.rxdata[0][i],rxdata); printf("rxdata[%d] @ %p (%p)\n", i, phy_vars_eNB->lte_eNB_common_vars.rxdata[0][i],rxdata);
} }
for (i=0;i<frame_parms[0]->nb_antennas_tx;i++) { for (i=0;i<frame_parms[0].nb_antennas_tx;i++) {
free(phy_vars_eNB->lte_eNB_common_vars.txdata[0][i]); free(phy_vars_eNB->lte_eNB_common_vars.txdata[0][i]);
txdata = (int32_t*)malloc16(samples_per_frame*sizeof(int32_t)); txdata = (int32_t*)malloc16(samples_per_frame*sizeof(int32_t));
phy_vars_eNB->lte_eNB_common_vars.txdata[0][i] = txdata; phy_vars_eNB->lte_eNB_common_vars.txdata[0][i] = txdata;
......
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