Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ZhouShuya
OpenXG-RAN
Commits
acc57964
Commit
acc57964
authored
May 24, 2018
by
matzakos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor modifications to ensure that both D2D and nfapi-L2-emulator work fine individually.
parent
cd35f606
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
16 deletions
+32
-16
common/config/config_cmdline.c
common/config/config_cmdline.c
+4
-3
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+1
-0
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+0
-1
openair3/NAS/UE/API/USIM/usim_api.h
openair3/NAS/UE/API/USIM/usim_api.h
+3
-1
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+1
-0
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+14
-8
targets/RT/USER/lte-uesoftmodem.c
targets/RT/USER/lte-uesoftmodem.c
+9
-3
No files found.
common/config/config_cmdline.c
View file @
acc57964
...
@@ -56,7 +56,7 @@ char defbool[2]="1";
...
@@ -56,7 +56,7 @@ char defbool[2]="1";
case
TYPE_STRING
:
case
TYPE_STRING
:
config_check_valptr
(
cfgoptions
,
(
char
**
)(
cfgoptions
->
strptr
),
sizeof
(
char
*
));
config_check_valptr
(
cfgoptions
,
(
char
**
)(
cfgoptions
->
strptr
),
sizeof
(
char
*
));
config_check_valptr
(
cfgoptions
,
cfgoptions
->
strptr
,
strlen
(
tmpval
+
1
));
config_check_valptr
(
cfgoptions
,
cfgoptions
->
strptr
,
strlen
(
tmpval
+
1
));
printf
(
"cfgoptions->strptr %p (&emul_iface %p, emul_iface %p)
\n
"
,
cfgoptions
->
strptr
,
&
emul_iface
,
emul_iface
);
printf
(
"cfgoptions->strptr %p (&emul_iface %p, emul_iface %p)
\n
\n
\n
"
,
cfgoptions
->
strptr
,
&
emul_iface
,
emul_iface
);
sprintf
(
*
(
cfgoptions
->
strptr
),
"%s"
,
tmpval
);
sprintf
(
*
(
cfgoptions
->
strptr
),
"%s"
,
tmpval
);
printf
(
"[CONFIG] %s set to %s from command line
\n
"
,
cfgoptions
->
optname
,
tmpval
);
printf
(
"[CONFIG] %s set to %s from command line
\n
"
,
cfgoptions
->
optname
,
tmpval
);
/*=======
/*=======
...
@@ -64,10 +64,11 @@ char defbool[2]="1";
...
@@ -64,10 +64,11 @@ char defbool[2]="1";
config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(tmpval)+1);
config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(tmpval)+1);
sprintf(*(cfgoptions->strptr), "%s",tmpval);
sprintf(*(cfgoptions->strptr), "%s",tmpval);
} else {
} else {
sprintf( (char *)(cfgoptions->strptr), "%s",tmpval);
//sprintf(*(cfgoptions->strptr), "%s",tmpval);
sprintf( (char *)(cfgoptions->strptr), "%s",tmpval);
}
}
printf_cmdl("[CONFIG] %s set to %s from command line\n", cfgoptions->optname, tmpval);
printf_cmdl("[CONFIG] %s set to %s from command line\n", cfgoptions->optname, tmpval);
>>>>>>> main/develop*/
//
>>>>>>> main/develop*/
optisset
=
1
;
optisset
=
1
;
break
;
break
;
...
...
openair1/SCHED/phy_procedures_lte_ue.c
View file @
acc57964
...
@@ -2341,6 +2341,7 @@ void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
...
@@ -2341,6 +2341,7 @@ void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
SLDCH_t
*
sldch
;
SLDCH_t
*
sldch
;
SLSCH_t
*
slsch
;
SLSCH_t
*
slsch
;
LOG_D
(
PHY
,
"****** start Sidelink TX-Chain for AbsSubframe %d.%d ******
\n
"
,
frame_tx
,
subframe_tx
);
LOG_D
(
PHY
,
"****** start Sidelink TX-Chain for AbsSubframe %d.%d ******
\n
"
,
frame_tx
,
subframe_tx
);
// check for SLBCH/SLSS
// check for SLBCH/SLSS
...
...
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
View file @
acc57964
...
@@ -74,7 +74,6 @@ extern int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req);
...
@@ -74,7 +74,6 @@ extern int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req);
extern
void
add_subframe
(
uint16_t
*
frameP
,
uint16_t
*
subframeP
,
int
offset
);
extern
void
add_subframe
(
uint16_t
*
frameP
,
uint16_t
*
subframeP
,
int
offset
);
extern
uint16_t
sfnsf_add_subframe
(
uint16_t
frameP
,
uint16_t
subframeP
,
int
offset
);
extern
uint16_t
sfnsf_add_subframe
(
uint16_t
frameP
,
uint16_t
subframeP
,
int
offset
);
extern
int
oai_nfapi_ul_config_req
(
nfapi_ul_config_request_t
*
ul_config_req
);
extern
int
oai_nfapi_ul_config_req
(
nfapi_ul_config_request_t
*
ul_config_req
);
extern
uint8_t
nfapi_mode
;
extern
uint8_t
nfapi_mode
;
extern
uint8_t
nfapi_mode
;
...
...
openair3/NAS/UE/API/USIM/usim_api.h
View file @
acc57964
...
@@ -52,7 +52,9 @@ Description Implements the API used by the NAS layer to read/write
...
@@ -52,7 +52,9 @@ Description Implements the API used by the NAS layer to read/write
* Subscriber authentication security key
* Subscriber authentication security key
*/
*/
#define USIM_API_K_SIZE 16
#define USIM_API_K_SIZE 16
#define USIM_API_K_VALUE "fec86ba6eb707ed08905757b1bb44b8f"
//#define USIM_API_K_VALUE "fec86ba6eb707ed08905757b1bb44b8f"
#define USIM_API_K_VALUE "8baf473f2f8fd09487cccbd7097c6862"
/*
/*
* The name of the file where are stored data of the USIM application
* The name of the file where are stored data of the USIM application
...
...
targets/RT/USER/lte-softmodem.h
View file @
acc57964
...
@@ -139,6 +139,7 @@
...
@@ -139,6 +139,7 @@
{"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}, \
{"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}, \
{"L2-emul", NULL, 0, u8ptr:&nfapi_mode, defuintval:3, TYPE_UINT8, 0}, \
{"L2-emul", NULL, 0, u8ptr:&nfapi_mode, defuintval:3, TYPE_UINT8, 0}, \
{"D2D-emul", NULL, 0, u8ptr:&D2D_en, defuintval:0, TYPE_UINT8, 0}, \
{"num-ues", NULL, 0, u8ptr:&(NB_UE_INST), defuintval:1, TYPE_UINT8, 0}, \
{"num-ues", NULL, 0, u8ptr:&(NB_UE_INST), defuintval:1, TYPE_UINT8, 0}, \
{"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT8, 0} \
{"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT8, 0} \
}
}
...
...
targets/RT/USER/lte-ue.c
View file @
acc57964
...
@@ -63,6 +63,7 @@
...
@@ -63,6 +63,7 @@
extern
double
cpuf
;
extern
double
cpuf
;
extern
uint8_t
nfapi_mode
;
extern
uint8_t
nfapi_mode
;
extern
uint8_t
D2D_en
;
#define FRAME_PERIOD 100000000ULL
#define FRAME_PERIOD 100000000ULL
#define DAQ_PERIOD 66667ULL
#define DAQ_PERIOD 66667ULL
...
@@ -308,7 +309,7 @@ void init_UE_stub_single_thread(int nb_inst,int eMBMS_active, int uecap_xer_in,
...
@@ -308,7 +309,7 @@ void init_UE_stub_single_thread(int nb_inst,int eMBMS_active, int uecap_xer_in,
printf
(
"UE threads created
\n
"
);
printf
(
"UE threads created
\n
"
);
LOG_I
(
PHY
,
"Starting multicast link on %s
\n
"
,
emul_iface
);
LOG_I
(
PHY
,
"Starting multicast link on %s
\n
"
,
emul_iface
);
if
(
nfapi_mode
!=
3
)
//if(nfapi_mode !=3) //This has to change now. It should be active for the case of D2D On-net
multicast_link_start
(
ue_stub_rx_handler
,
0
,
emul_iface
);
multicast_link_start
(
ue_stub_rx_handler
,
0
,
emul_iface
);
...
@@ -344,7 +345,7 @@ void init_UE_stub(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_ifa
...
@@ -344,7 +345,7 @@ void init_UE_stub(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_ifa
printf
(
"UE threads created
\n
"
);
printf
(
"UE threads created
\n
"
);
LOG_I
(
PHY
,
"Starting multicast link on %s
\n
"
,
emul_iface
);
LOG_I
(
PHY
,
"Starting multicast link on %s
\n
"
,
emul_iface
);
if
(
nfapi_mode
!=
3
)
//if(nfapi_mode !=3) //This has to change now. It should be active for the case of D2D On-net
multicast_link_start
(
ue_stub_rx_handler
,
0
,
emul_iface
);
multicast_link_start
(
ue_stub_rx_handler
,
0
,
emul_iface
);
...
@@ -892,7 +893,7 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
...
@@ -892,7 +893,7 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
hi_dci0_req
=
NULL
;
hi_dci0_req
=
NULL
;
tx_request_pdu_list
=
NULL
;
tx_request_pdu_list
=
NULL
;
PHY_VARS_UE
*
UE
;
//= rtd->UE;
PHY_VARS_UE
*
UE
;
//= rtd->UE;
int
ret
;
int
ret
;
// double t_diff;
// double t_diff;
...
@@ -1002,7 +1003,10 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
...
@@ -1002,7 +1003,10 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) {
hi_dci0_req_UE_MAC
(
hi_dci0_req
,
Mod_id
);
hi_dci0_req_UE_MAC
(
hi_dci0_req
,
Mod_id
);
}
}
if
(
nfapi_mode
!=
3
)
//Panos: Have to remove this now that we run both D2D and nfapi-L2-emulator.
//Currently the call to this function creates problems for the RRC Connection establishment for
//if running with more than one UEs
//if(nfapi_mode!=3)
phy_procedures_UE_SL_TX
(
UE
,
proc
);
phy_procedures_UE_SL_TX
(
UE
,
proc
);
}
}
...
@@ -1295,7 +1299,7 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
...
@@ -1295,7 +1299,7 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg) {
hi_dci0_req
=
NULL
;
hi_dci0_req
=
NULL
;
}
}
if
(
nfapi_mode
!=
3
)
//
if (nfapi_mode != 3)
phy_procedures_UE_SL_TX
(
UE
,
proc
);
phy_procedures_UE_SL_TX
(
UE
,
proc
);
}
}
...
@@ -2068,7 +2072,8 @@ static void* timer_thread( void* param ) {
...
@@ -2068,7 +2072,8 @@ static void* timer_thread( void* param ) {
opp_enabled
=
1
;
opp_enabled
=
1
;
// first check if we are receiving timing indications
// first check if we are receiving timing indications
if
(
nfapi_mode
==
4
)
{
if
(
D2D_en
){
//if(nfapi_mode==4) {
usleep
(
10000
);
usleep
(
10000
);
if
(
UE
->
instance_cnt_timer
>
0
)
{
if
(
UE
->
instance_cnt_timer
>
0
)
{
external_timer
=
1
;
external_timer
=
1
;
...
@@ -2147,11 +2152,12 @@ static void* timer_thread( void* param ) {
...
@@ -2147,11 +2152,12 @@ static void* timer_thread( void* param ) {
UE_tport_t
pdu
;
UE_tport_t
pdu
;
pdu
.
header
.
packet_type
=
TTI_SYNC
;
pdu
.
header
.
packet_type
=
TTI_SYNC
;
pdu
.
header
.
absSF
=
(
timer_frame
*
10
)
+
timer_subframe
;
pdu
.
header
.
absSF
=
(
timer_frame
*
10
)
+
timer_subframe
;
if
(
nfapi_mode
!=
3
){
//Panos: substitute this check with a check related to D2D (i.e., if D2D is enabled)
//if (nfapi_mode!=3){
multicast_link_write_sock
(
0
,
multicast_link_write_sock
(
0
,
&
pdu
,
&
pdu
,
sizeof
(
UE_tport_header_t
));
sizeof
(
UE_tport_header_t
));
}
//
}
}
}
else
{
else
{
...
...
targets/RT/USER/lte-uesoftmodem.c
View file @
acc57964
...
@@ -120,6 +120,9 @@ int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
...
@@ -120,6 +120,9 @@ int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
uint8_t
nfapi_mode
=
0
;
uint8_t
nfapi_mode
=
0
;
// Enabling D2D operations. Currently hardcoded but it should eventually be an execution option.
uint8_t
D2D_en
=
0
;
uint16_t
sf_ahead
=
2
;
uint16_t
sf_ahead
=
2
;
char
*
emul_iface
;
char
*
emul_iface
;
...
@@ -588,7 +591,7 @@ static void get_options(void) {
...
@@ -588,7 +591,7 @@ static void get_options(void) {
// Read it in and store in asn1c data structures
// Read it in and store in asn1c data structures
sprintf
(
uecap_xer
,
"%stargets/PROJECTS/GENERIC-LTE-EPC/CONF/UE_config.xml"
,
getenv
(
"OPENAIR_HOME"
));
sprintf
(
uecap_xer
,
"%stargets/PROJECTS/GENERIC-LTE-EPC/CONF/UE_config.xml"
,
getenv
(
"OPENAIR_HOME"
));
printf
(
"%s
\n
"
,
uecap_xer
);
printf
(
"%s
\n
"
,
uecap_xer
);
if
(
nfapi_mode
!=
3
)
if
(
nfapi_mode
!=
3
&&
D2D_en
!=
1
)
uecap_xer_in
=
1
;
uecap_xer_in
=
1
;
}
/* UE with config file */
}
/* UE with config file */
}
}
...
@@ -827,6 +830,8 @@ int main( int argc, char **argv )
...
@@ -827,6 +830,8 @@ int main( int argc, char **argv )
printf
(
"NFAPI_MODE value: %d
\n
"
,
nfapi_mode
);
printf
(
"NFAPI_MODE value: %d
\n
"
,
nfapi_mode
);
printf
(
"D2D_en value: %d
\n
\n
"
,
D2D_en
);
// Panos: Not sure if the following is needed here
// Panos: Not sure if the following is needed here
/*if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
/*if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
if (UE_flag == 0) {
if (UE_flag == 0) {
...
@@ -1174,10 +1179,11 @@ int main( int argc, char **argv )
...
@@ -1174,10 +1179,11 @@ int main( int argc, char **argv )
// start the main threads
// start the main threads
int
eMBMS_active
=
0
;
int
eMBMS_active
=
0
;
if
(
nfapi_mode
==
3
)
// UE-STUB-PNF
if
(
nfapi_mode
==
3
||
D2D_en
==
1
)
// UE-STUB-PNF or D2D (offnet) or both(D2D on-net)
{
{
config_sync_var
=
0
;
config_sync_var
=
0
;
wait_nfapi_init
(
"main?"
);
if
(
nfapi_mode
==
3
)
wait_nfapi_init
(
"main?"
);
//Panos: Temporarily we will be using single set of threads for multiple UEs.
//Panos: Temporarily we will be using single set of threads for multiple UEs.
//init_UE_stub(1,eMBMS_active,uecap_xer_in,emul_iface);
//init_UE_stub(1,eMBMS_active,uecap_xer_in,emul_iface);
init_UE_stub_single_thread
(
NB_UE_INST
,
eMBMS_active
,
uecap_xer_in
,
emul_iface
);
init_UE_stub_single_thread
(
NB_UE_INST
,
eMBMS_active
,
uecap_xer_in
,
emul_iface
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment