Commit 783f36ee authored by Raymond Knopp's avatar Raymond Knopp

added pssch.h, command-line arguments for L1 simulation

parent b13452ce
#define TRP8_MAX 106
const int trp8[TRP8_MAX+1][8] = {{1,0,0,0,0,0,0,0},
{0,1,0,0,0,0,0,0},
{0,0,1,0,0,0,0,0},
{0,0,0,1,0,0,0,0},
{0,0,0,0,1,0,0,0},
{0,0,0,0,0,1,0,0},
{0,0,0,0,0,0,1,0},
{0,0,0,0,0,0,0,1},
{1,1,0,0,0,0,0,0},
{1,0,1,0,0,0,0,0},
{0,1,1,0,0,0,0,0},
{1,0,0,1,0,0,0,0},
{0,1,0,1,0,0,0,0},
{0,0,1,1,0,0,0,0},
{1,0,0,0,1,0,0,0},
{0,1,0,0,1,0,0,0},
{0,0,1,0,1,0,0,0},
{0,0,0,1,1,0,0,0},
{1,0,0,0,0,1,0,0},
{0,1,0,0,0,1,0,0},
{0,0,1,0,0,1,0,0},
{0,0,0,1,0,1,0,0},
{0,0,0,0,1,1,0,0},
{1,0,0,0,0,0,1,0},
{0,1,0,0,0,0,1,0},
{0,0,1,0,0,0,1,0},
{0,0,0,1,0,0,1,0},
{0,0,0,0,1,0,1,0},
{0,0,0,0,0,1,1,0},
{1,0,0,0,0,0,0,1},
{0,1,0,0,0,0,0,1},
{0,0,1,0,0,0,0,1},
{0,0,0,1,0,0,0,1},
{0,0,0,0,1,0,0,1},
{0,0,0,0,0,1,0,1},
{0,0,0,0,0,0,1,1},
{1,1,1,1,0,0,0,0},
{1,1,1,0,1,0,0,0},
{1,1,0,1,1,0,0,0},
{1,0,1,1,1,0,0,0},
{0,1,1,1,1,0,0,0},
{1,1,1,0,0,1,0,0},
{1,1,0,1,0,1,0,0},
{1,0,1,1,0,1,0,0},
{0,1,1,1,0,1,0,0},
{1,1,0,0,1,1,0,0},
{1,0,1,0,1,1,0,0},
{0,1,1,0,1,1,0,0},
{1,0,0,1,1,1,0,0},
{0,1,0,1,1,1,0,0},
{0,0,1,1,1,1,0,0},
{1,1,1,0,0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i_mode = 3; ...@@ -130,6 +130,7 @@ uint8_t nfapi_mode = 3;
uint16_t sf_ahead=2; uint16_t sf_ahead=2;
int simL1;
char *emul_iface; char *emul_iface;
pthread_cond_t sync_cond; pthread_cond_t sync_cond;
...@@ -230,7 +231,7 @@ extern PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -230,7 +231,7 @@ extern PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t abstraction_flag); uint8_t abstraction_flag);
extern void init_eNB_afterRU(void); extern void init_eNB_afterRU(void);
extern void init_UE_stub(int nb_inst,int,int,char*); extern void init_UE_stub(int nb_inst,int,int,char*,int);
extern int init_timer_thread(void); extern int init_timer_thread(void);
int transmission_mode=1; int transmission_mode=1;
...@@ -1370,7 +1371,7 @@ int main( int argc, char **argv ) ...@@ -1370,7 +1371,7 @@ int main( int argc, char **argv )
// Panos: CHANGE we call init_timer_thread() from inside init_UE_stub() now // Panos: CHANGE we call init_timer_thread() from inside init_UE_stub() now
//init_timer_thread(); //init_timer_thread();
init_UE_stub(1,eMBMS_active,uecap_xer_in,emul_iface); init_UE_stub(1,eMBMS_active,uecap_xer_in,emul_iface,simL1);
/*for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { /*for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
......
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
#define CONFIG_HLP_STMON "Enable processing timing measurement of lte softmodem on per subframe basis \n" #define CONFIG_HLP_STMON "Enable processing timing measurement of lte softmodem on per subframe basis \n"
#define CONFIG_HLP_PRB "Set the PRB, valid values: 6, 25, 50, 100 \n" #define CONFIG_HLP_PRB "Set the PRB, valid values: 6, 25, 50, 100 \n"
#define CONFIG_HLP_EMULIFACE "Set the interface name for the multicast transport for emulation mode (e.g. eth0, lo, etc.) \n" #define CONFIG_HLP_EMULIFACE "Set the interface name for the multicast transport for emulation mode (e.g. eth0, lo, etc.) \n"
#define CONFIG_HLP_SIML1 "Turn on simulation interface for L1"
#define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \n" #define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \n"
#define CONFIG_HLP_ULMCS "Set the maximum uplink MCS\n" #define CONFIG_HLP_ULMCS "Set the maximum uplink MCS\n"
#define CONFIG_HLP_TDD "Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n" #define CONFIG_HLP_TDD "Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n"
...@@ -129,8 +130,9 @@ ...@@ -129,8 +130,9 @@
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&UE_scan_carrier, defintval:0, TYPE_INT, 0}, \ {"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&UE_scan_carrier, defintval:0, TYPE_INT, 0}, \
{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \ {"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \
{"r" , CONFIG_HLP_PRB, 0, u8ptr:&n_rb_dl, defintval:0, TYPE_UINT8, 0}, \ {"r" , CONFIG_HLP_PRB, 0, u8ptr:&n_rb_dl, defintval:0, TYPE_UINT8, 0}, \
{"emul-iface", CONFIG_HLP_EMULIFACE, 0, strptr:&emul_iface, defstrval:"lo", TYPE_STRING, 100} \ {"emul-iface", CONFIG_HLP_EMULIFACE, 0, strptr:&emul_iface, defstrval:"lo", TYPE_STRING, 100},\
} {"sim-L1", CONFIG_HLP_SIML1, 0, iptr:&simL1, defintval:0, TYPE_INT, 0} \
}
extern int16_t dlsch_demod_shift; extern int16_t dlsch_demod_shift;
......
...@@ -78,7 +78,7 @@ void init_UE_threads(int); ...@@ -78,7 +78,7 @@ void init_UE_threads(int);
void init_UE_threads_stub(int); void init_UE_threads_stub(int);
void *UE_thread(void *arg); void *UE_thread(void *arg);
void init_UE(int nb_inst,int,int); void init_UE(int nb_inst,int,int);
void init_UE_stub(int nb_inst,int,int,char*); void init_UE_stub(int nb_inst,int,int,char*,int);
extern void oai_subframe_ind(uint16_t sfn, uint16_t sf); extern void oai_subframe_ind(uint16_t sfn, uint16_t sf);
//extern int tx_req_UE_MAC1(); //extern int tx_req_UE_MAC1();
...@@ -271,7 +271,7 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in) { ...@@ -271,7 +271,7 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in) {
} }
void init_UE_stub(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_iface) { void init_UE_stub(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_iface, int simL1) {
int inst; int inst;
...@@ -285,11 +285,16 @@ void init_UE_stub(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_ifa ...@@ -285,11 +285,16 @@ void init_UE_stub(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_ifa
LOG_I(PHY,"Initializing memory for UE instance %d (%p)\n",inst,PHY_vars_UE_g[inst]); LOG_I(PHY,"Initializing memory for UE instance %d (%p)\n",inst,PHY_vars_UE_g[inst]);
PHY_vars_UE_g[inst][0] = init_ue_vars(NULL,inst,0); PHY_vars_UE_g[inst][0] = init_ue_vars(NULL,inst,0);
if (simL1 == 1) PHY_vars_UE_g[inst][0]->sidelink_l2_emulation = 2;
else PHY_vars_UE_g[inst][0]->sidelink_l2_emulation = 1;
} }
init_timer_thread(); init_timer_thread();
init_sl_channel(); init_sl_channel();
for (inst=0;inst<nb_inst;inst++) { for (inst=0;inst<nb_inst;inst++) {
LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]); LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][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