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
canghaiwuhen
OpenXG-RAN
Commits
7d8daa37
Commit
7d8daa37
authored
Jan 14, 2020
by
Chang-Sheng,Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add rxtx_NB_IoT()
parent
8b5e70e0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
2 deletions
+105
-2
openair1/PHY/defs_L1_NB_IoT.h
openair1/PHY/defs_L1_NB_IoT.h
+4
-1
openair1/SCHED_NBIOT/phy_procedures_lte_eNb_NB_IoT.c
openair1/SCHED_NBIOT/phy_procedures_lte_eNb_NB_IoT.c
+46
-1
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+54
-0
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+1
-0
No files found.
openair1/PHY/defs_L1_NB_IoT.h
View file @
7d8daa37
...
...
@@ -424,7 +424,10 @@ typedef struct eNB_proc_NB_IoT_t_s {
/// set of scheduling variables RXn-TXnp4 threads
// newly added for NB_IoT
eNB_rxtx_proc_NB_IoT_t
proc_rxtx
[
2
];
//samuel
uint16_t
HFN
;
pthread_mutex_t
mutex_rxtx
;
int
instance_cnt_rxtx
;
}
eNB_proc_NB_IoT_t
;
...
...
openair1/SCHED_NBIOT/phy_procedures_lte_eNb_NB_IoT.c
View file @
7d8daa37
...
...
@@ -1402,4 +1402,49 @@ void prach_procedures_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB) {
0,subframe,0);*/
}
}
\ No newline at end of file
}
//samuel
void
do_prach_NB_IoT
(
PHY_VARS_eNB
*
eNB
,
int
frame
,
int
subframe
)
{
eNB_proc_t
*
proc
=
&
eNB
->
proc
;
// LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
if
(
frame
%
2
==
0
&&
subframe
==
9
)
{
// check if we have to detect PRACH first
//if (is_prach_subframe(fp,frame,subframe)>0) {
/* accept some delay in processing - up to 5ms */
int
i
;
for
(
i
=
0
;
i
<
10
&&
proc
->
instance_cnt_prach
==
0
;
i
++
)
{
LOG_W
(
PHY
,
"[eNB] Frame %d Subframe %d, eNB PRACH thread busy (IC %d)!!
\n
"
,
frame
,
subframe
,
proc
->
instance_cnt_prach
);
usleep
(
500
);
}
if
(
proc
->
instance_cnt_prach
==
0
)
{
exit_fun
(
"PRACH thread busy"
);
return
;
}
// wake up thread for PRACH RX
if
(
pthread_mutex_lock
(
&
proc
->
mutex_prach
)
!=
0
)
{
LOG_E
(
PHY
,
"[eNB] ERROR pthread_mutex_lock for eNB PRACH thread %d (IC %d)
\n
"
,
proc
->
thread_index
,
proc
->
instance_cnt_prach
);
exit_fun
(
"error locking mutex_prach"
);
return
;
}
++
proc
->
instance_cnt_prach
;
// set timing for prach thread
proc
->
frame_prach
=
frame
;
proc
->
subframe_prach
=
subframe
;
// the thread can now be woken up
if
(
pthread_cond_signal
(
&
proc
->
cond_prach
)
!=
0
)
{
LOG_E
(
PHY
,
"[eNB] ERROR pthread_cond_signal for eNB PRACH thread %d
\n
"
,
proc
->
thread_index
);
exit_fun
(
"ERROR pthread_cond_signal"
);
return
;
}
pthread_mutex_unlock
(
&
proc
->
mutex_prach
);
//}
}
}
targets/RT/USER/lte-enb.c
View file @
7d8daa37
...
...
@@ -157,11 +157,64 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe);
extern
void
oai_subframe_ind
(
uint16_t
sfn
,
uint16_t
sf
);
extern
void
add_subframe
(
uint16_t
*
frameP
,
uint16_t
*
subframeP
,
int
offset
);
//samuel
extern
void
do_prach_NB_IoT
(
PHY_VARS_eNB
*
eNB
,
int
frame
,
int
subframe
);
//#define TICK_TO_US(ts) (ts.diff)
#define TICK_TO_US(ts) (ts.trials==0?0:ts.diff/ts.trials)
eNBs_t
eNBs
;
//Ann and samuel
static
inline
int
rxtx_NB_IoT
(
PHY_VARS_eNB_NB_IoT
*
eNB
,
eNB_proc_NB_IoT_t
*
proc
,
char
*
thread_name
)
{
///start_meas(&softmodem_stats_rxtx_sf);
// ****************************************
// Common RX procedures subframe n
if
((
eNB
->
do_prach
)
&&
((
eNB
->
node_function
!=
NGFI_RCC_IF4p5_NB_IoT
)))
eNB
->
do_prach
(
eNB
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
//phy_procedures_eNB_common_RX(eNB,proc);//samuel
// UE-specific RX processing for subframe n
///////////////////////////////////// for NB-IoT testing ////////////////////////
// for NB-IoT testing // activating only TX part
//if (eNB->proc_uespec_rx) eNB->proc_uespec_rx(eNB, proc );//samuel
////////////////////////////////////END///////////////////////
//npusch_procedures(eNB,proc,data_or_control);
//fill_rx_indication(eNB,i,frame,subframe);
//////////////////////////////////// for IF Module/scheduler testing
pthread_mutex_lock
(
&
eNB
->
UL_INFO_mutex
);
eNB
->
UL_INFO
.
frame
=
proc
->
frame_rx
;
eNB
->
UL_INFO
.
subframe
=
proc
->
subframe_rx
;
eNB
->
UL_INFO
.
module_id
=
eNB
->
Mod_id
;
eNB
->
UL_INFO
.
CC_id
=
eNB
->
CC_id
;
eNB
->
UL_INFO
.
hypersfn
=
proc
->
HFN
;
eNB
->
if_inst_NB_IoT
->
UL_indication
(
&
eNB
->
UL_INFO
);
pthread_mutex_unlock
(
&
eNB
->
UL_INFO_mutex
);
//LOG_I(PHY,"After UL_indication\n");
// *****************************************
// TX processing for subframe n+4
// run PHY TX procedures the one after the other for all CCs to avoid race conditions
// (may be relaxed in the future for performance reasons)
// *****************************************
//if (wait_CCs(proc)<0) return(-1);
if
(
oai_exit
)
return
(
-
1
);
//if (eNB->proc_tx) eNB->proc_tx(eNB, proc, no_relay, NULL );//samuel
if
(
release_thread
(
&
proc
->
mutex_rxtx
,
&
proc
->
instance_cnt_rxtx
,
thread_name
)
<
0
)
return
(
-
1
);
/// stop_meas( &softmodem_stats_rxtx_sf );
return
(
0
);
}
static
inline
int
rxtx
(
PHY_VARS_eNB
*
eNB
,
L1_rxtx_proc_t
*
proc
,
char
*
thread_name
)
{
int
ret
;
start_meas
(
&
softmodem_stats_rxtx_sf
);
...
...
@@ -431,6 +484,7 @@ static void *L1_thread( void *param ) {
if
(
eNB
->
CC_id
==
0
)
{
if
(
rxtx
(
eNB
,
proc
,
thread_name
)
<
0
)
break
;
if
(
rxtx_NB_IoT
(
eNBs
.
eNB_NB_IoT
,
&
(
eNBs
.
eNB_NB_IoT
->
proc
),
thread_name
));
}
LOG_D
(
PHY
,
"L1 RX %d.%d done
\n
"
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
...
...
targets/RT/USER/lte-softmodem.c
View file @
7d8daa37
...
...
@@ -627,6 +627,7 @@ int main( int argc, char **argv ) {
itti_send_msg_to_task
(
TASK_RRC_ENB
,
ENB_MODULE_ID_TO_INSTANCE
(
enb_id
),
msg_p
);
}
node_type
=
RC
.
rrc
[
0
]
->
node_type
;
RCconfig_NbIoTL1
();
//samuel
}
else
{
printf
(
"RC.nb_inst = 0, Initializing L1
\n
"
);
RCconfig_L1
();
...
...
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