Commit 86ab3939 authored by Florian Kaltenberger's avatar Florian Kaltenberger
Browse files

xforms now command line option for ulsim and dlsim

fixed mbmssim compilation issue
one more fix for build script sudo usage
parent 8f9b55d7
...@@ -760,9 +760,9 @@ fi ...@@ -760,9 +760,9 @@ fi
rm -fr $OPENAIR_DIR/cmake_targets/autotests/log rm -fr $OPENAIR_DIR/cmake_targets/autotests/log
mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log
if [ "$RUN_GROUP" -eq "1" ]; then if [ "$RUN_GROUP" -eq "1" ]; then
$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -g "$TEST_CASE_GROUP" -p '$mypassword' >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log & $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -g "$TEST_CASE_GROUP" -p $mypassword >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log &
else else
$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -p '$mypassword' >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log & $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -p $mypassword >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log &
fi fi
wait wait
else else
......
...@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8) ...@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "unitary_tests_simulators") set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True) set(PHYSIM True)
set(RF_BOARD None) set(RF_BOARD None)
set(XFORMS False) set(XFORMS True)
set(DEBUG_PHY False) set(DEBUG_PHY False)
set(MU_RECIEVER False) set(MU_RECIEVER False)
......
...@@ -61,25 +61,7 @@ ...@@ -61,25 +61,7 @@
extern unsigned int dlsch_tbs25[27][25],TBStable[27][110]; extern unsigned int dlsch_tbs25[27][25],TBStable[27][110];
extern unsigned char offset_mumimo_llr_drange_fix; extern unsigned char offset_mumimo_llr_drange_fix;
#ifdef XFORMS
#include "PHY/TOOLS/lte_phy_scope.h" #include "PHY/TOOLS/lte_phy_scope.h"
#endif
//#define AWGN
//#define NO_DCI
//#define ABSTRACTION
/*
#define RBmask0 0x00fc00fc
#define RBmask1 0x0
#define RBmask2 0x0
#define RBmask3 0x0
*/
PHY_VARS_eNB *PHY_vars_eNB; PHY_VARS_eNB *PHY_vars_eNB;
PHY_VARS_UE *PHY_vars_UE; PHY_VARS_UE *PHY_vars_UE;
...@@ -237,10 +219,9 @@ int main(int argc, char **argv) ...@@ -237,10 +219,9 @@ int main(int argc, char **argv)
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;
#ifdef XFORMS int xforms=0;
FD_lte_phy_scope_ue *form_ue; FD_lte_phy_scope_ue *form_ue;
char title[255]; char title[255];
#endif
uint32_t DLSCH_RB_ALLOC = 0x1fff; uint32_t DLSCH_RB_ALLOC = 0x1fff;
int numCCE=0; int numCCE=0;
int dci_length_bytes=0,dci_length=0; int dci_length_bytes=0,dci_length=0;
...@@ -305,7 +286,7 @@ int main(int argc, char **argv) ...@@ -305,7 +286,7 @@ int main(int argc, char **argv)
// num_layers = 1; // num_layers = 1;
perfect_ce = 0; perfect_ce = 0;
while ((c = getopt (argc, argv, "ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:Y")) != -1) { while ((c = getopt (argc, argv, "ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:XY")) != -1) {
switch (c) { switch (c) {
case 'a': case 'a':
awgn_flag = 1; awgn_flag = 1;
...@@ -557,6 +538,10 @@ int main(int argc, char **argv) ...@@ -557,6 +538,10 @@ int main(int argc, char **argv)
break; break;
case 'X':
xforms=1;
break;
case 'Y': case 'Y':
perfect_ce=1; perfect_ce=1;
break; break;
...@@ -636,21 +621,20 @@ int main(int argc, char **argv) ...@@ -636,21 +621,20 @@ int main(int argc, char **argv)
if ((transmission_mode > 1) && (n_tx != 2)) if ((transmission_mode > 1) && (n_tx != 2))
printf("n_tx must be >1 for transmission_mode %d\n",transmission_mode); printf("n_tx must be >1 for transmission_mode %d\n",transmission_mode);
#ifdef XFORMS if (xforms==1) {
fl_initialize (&argc, argv, NULL, 0, 0); fl_initialize (&argc, argv, NULL, 0, 0);
form_ue = create_lte_phy_scope_ue(); form_ue = create_lte_phy_scope_ue();
sprintf (title, "LTE PHY SCOPE eNB"); sprintf (title, "LTE PHY SCOPE eNB");
fl_show_form (form_ue->lte_phy_scope_ue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title); fl_show_form (form_ue->lte_phy_scope_ue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
if (!dual_stream_UE==0) { if (!dual_stream_UE==0) {
openair_daq_vars.use_ia_receiver = 1; openair_daq_vars.use_ia_receiver = 1;
fl_set_button(form_ue->button_0,1); fl_set_button(form_ue->button_0,1);
fl_set_object_label(form_ue->button_0, "IA Receiver ON"); fl_set_object_label(form_ue->button_0, "IA Receiver ON");
fl_set_object_color(form_ue->button_0, FL_GREEN, FL_GREEN); fl_set_object_color(form_ue->button_0, FL_GREEN, FL_GREEN);
}
} }
#endif
if (transmission_mode==5) { if (transmission_mode==5) {
n_users = 2; n_users = 2;
printf("dual_stream_UE=%d\n", dual_stream_UE); printf("dual_stream_UE=%d\n", dual_stream_UE);
...@@ -3496,13 +3480,13 @@ PMI_FEEDBACK: ...@@ -3496,13 +3480,13 @@ PMI_FEEDBACK:
// PHY_vars_UE->dlsch_ue[0][0]->harq_processes[0]->round++; // PHY_vars_UE->dlsch_ue[0][0]->harq_processes[0]->round++;
} }
#ifdef XFORMS if (xforms==1) {
phy_scope_UE(form_ue, phy_scope_UE(form_ue,
PHY_vars_UE, PHY_vars_UE,
eNB_id, eNB_id,
0,// UE_id 0,// UE_id
subframe); subframe);
#endif }
} //round } //round
......
...@@ -173,7 +173,9 @@ int main(int argc, char **argv) ...@@ -173,7 +173,9 @@ int main(int argc, char **argv)
lte_frame_type_t frame_type = FDD; lte_frame_type_t frame_type = FDD;
uint32_t Nsoft = 1827072;
/*
#ifdef XFORMS #ifdef XFORMS
FD_lte_phy_scope_ue *form_ue; FD_lte_phy_scope_ue *form_ue;
char title[255]; char title[255];
...@@ -183,6 +185,7 @@ int main(int argc, char **argv) ...@@ -183,6 +185,7 @@ int main(int argc, char **argv)
sprintf (title, "LTE DL SCOPE UE"); sprintf (title, "LTE DL SCOPE UE");
fl_show_form (form_ue->lte_phy_scope_ue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title); fl_show_form (form_ue->lte_phy_scope_ue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
#endif #endif
*/
logInit(); logInit();
number_of_cards = 1; number_of_cards = 1;
...@@ -382,14 +385,14 @@ int main(int argc, char **argv) ...@@ -382,14 +385,14 @@ int main(int argc, char **argv)
0); 0);
// Create transport channel structures for 2 transport blocks (MIMO) // Create transport channel structures for 2 transport blocks (MIMO)
PHY_vars_eNB->dlsch_eNB_MCH = new_eNB_dlsch(1,8,N_RB_DL,0); PHY_vars_eNB->dlsch_eNB_MCH = new_eNB_dlsch(1,8,Nsoft,N_RB_DL,0);
if (!PHY_vars_eNB->dlsch_eNB_MCH) { if (!PHY_vars_eNB->dlsch_eNB_MCH) {
printf("Can't get eNB dlsch structures\n"); printf("Can't get eNB dlsch structures\n");
exit(-1); exit(-1);
} }
PHY_vars_UE->dlsch_ue_MCH[0] = new_ue_dlsch(1,8,MAX_TURBO_ITERATIONS_MBSFN,N_RB_DL,0); PHY_vars_UE->dlsch_ue_MCH[0] = new_ue_dlsch(1,8,Nsoft,MAX_TURBO_ITERATIONS_MBSFN,N_RB_DL,0);
PHY_vars_eNB->lte_frame_parms.num_MBSFN_config = 1; PHY_vars_eNB->lte_frame_parms.num_MBSFN_config = 1;
PHY_vars_eNB->lte_frame_parms.MBSFN_config[0].radioframeAllocationPeriod = 0; PHY_vars_eNB->lte_frame_parms.MBSFN_config[0].radioframeAllocationPeriod = 0;
......
...@@ -52,9 +52,7 @@ ...@@ -52,9 +52,7 @@
#include "LAYER2/MAC/vars.h" #include "LAYER2/MAC/vars.h"
#include "OCG_vars.h" #include "OCG_vars.h"
#ifdef XFORMS
#include "PHY/TOOLS/lte_phy_scope.h" #include "PHY/TOOLS/lte_phy_scope.h"
#endif
extern unsigned short dftsizes[33]; extern unsigned short dftsizes[33];
extern short *ul_ref_sigs[30][2][33]; extern short *ul_ref_sigs[30][2][33];
...@@ -74,12 +72,9 @@ node_desc_t *ue_data[NUMBER_OF_UE_MAX]; ...@@ -74,12 +72,9 @@ node_desc_t *ue_data[NUMBER_OF_UE_MAX];
extern uint16_t beta_ack[16],beta_ri[16],beta_cqi[16]; extern uint16_t beta_ack[16],beta_ri[16],beta_cqi[16];
//extern char* namepointer_chMag ; //extern char* namepointer_chMag ;
int xforms=0;
#ifdef XFORMS
FD_lte_phy_scope_enb *form_enb; FD_lte_phy_scope_enb *form_enb;
char title[255]; char title[255];
#endif
/*the following parameters are used to control the processing times*/ /*the following parameters are used to control the processing times*/
double t_tx_max = -1000000000; /*!< \brief initial max process time for tx */ double t_tx_max = -1000000000; /*!< \brief initial max process time for tx */
...@@ -204,7 +199,7 @@ int main(int argc, char **argv) ...@@ -204,7 +199,7 @@ int main(int argc, char **argv)
logInit(); logInit();
while ((c = getopt (argc, argv, "hapZEbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:L")) != -1) { while ((c = getopt (argc, argv, "hapZEbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:LF")) != -1) {
switch (c) { switch (c) {
case 'a': case 'a':
channel_model = AWGN; channel_model = AWGN;
...@@ -454,6 +449,10 @@ int main(int argc, char **argv) ...@@ -454,6 +449,10 @@ int main(int argc, char **argv)
max_turbo_iterations=atoi(optarg); max_turbo_iterations=atoi(optarg);
break; break;
case 'F':
xforms=1;
break;
case 'Z': case 'Z':
dump_table = 1; dump_table = 1;
break; break;
...@@ -594,12 +593,12 @@ int main(int argc, char **argv) ...@@ -594,12 +593,12 @@ int main(int argc, char **argv)
} }
#ifdef XFORMS if (xforms==1) {
fl_initialize (&argc, argv, NULL, 0, 0); fl_initialize (&argc, argv, NULL, 0, 0);
form_enb = create_lte_phy_scope_enb(); form_enb = create_lte_phy_scope_enb();
sprintf (title, "LTE PHY SCOPE eNB"); sprintf (title, "LTE PHY SCOPE eNB");
fl_show_form (form_enb->lte_phy_scope_enb, FL_PLACE_HOTSPOT, FL_FULLBORDER, title); fl_show_form (form_enb->lte_phy_scope_enb, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
#endif }
PHY_vars_UE->lte_ue_pdcch_vars[0]->crnti = 14; PHY_vars_UE->lte_ue_pdcch_vars[0]->crnti = 14;
...@@ -1354,9 +1353,9 @@ int main(int argc, char **argv) ...@@ -1354,9 +1353,9 @@ int main(int argc, char **argv)
if ((errs[0]>=100) && (trials>(n_frames/2))) if ((errs[0]>=100) && (trials>(n_frames/2)))
break; break;
#ifdef XFORMS if (xforms==1)
phy_scope_eNB(form_enb,PHY_vars_eNB,0); phy_scope_eNB(form_enb,PHY_vars_eNB,0);
#endif
/*calculate the total processing time for each packet, get the max, min, and number of packets that exceed t>3000us*/ /*calculate the total processing time for each packet, get the max, min, and number of packets that exceed t>3000us*/
double t_tx = (double)PHY_vars_UE->phy_proc_tx.p_time/cpu_freq_GHz/1000.0; double t_tx = (double)PHY_vars_UE->phy_proc_tx.p_time/cpu_freq_GHz/1000.0;
......
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