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
96e4e6f4
Commit
96e4e6f4
authored
Mar 27, 2018
by
Nick Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepare environment for IF Module Testing, scheduler not calling yet
parent
4496496a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
5 deletions
+54
-5
openair1/PHY/defs.h
openair1/PHY/defs.h
+6
-0
openair2/LAYER2/MAC/eNB_scheduler_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_NB_IoT.c
+16
-0
openair2/LAYER2/MAC/main_NB_IoT.c
openair2/LAYER2/MAC/main_NB_IoT.c
+2
-0
openair2/LAYER2/MAC/output_handler_NB_IoT.c
openair2/LAYER2/MAC/output_handler_NB_IoT.c
+2
-2
openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c
openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c
+9
-3
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+19
-0
No files found.
openair1/PHY/defs.h
View file @
96e4e6f4
...
...
@@ -121,6 +121,7 @@ static inline void* malloc16_clear( size_t size )
#include "impl_defs_lte.h"
#include "PHY/LTE_TRANSPORT/defs_NB_IoT.h"
#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
#include "PHY/TOOLS/time_meas.h"
#include "PHY/CODING/defs.h"
...
...
@@ -513,6 +514,11 @@ NB_IoT_eNB_NPBCH_t npbch;
NB_IoT_eNB_NDLSCH_t
*
ndlsch
[
NUMBER_OF_UE_MAX
];
NB_IoT_eNB_NDLSCH_t
ndlsch_SIB
;
////////////// For IF Module /////////////////////////////
IF_Module_NB_IoT_t
*
if_inst
;
UL_IND_NB_IoT_t
UL_INFO
;
//////////////////// END /////////////////////////////////
...
...
openair2/LAYER2/MAC/eNB_scheduler_NB_IoT.c
View file @
96e4e6f4
...
...
@@ -84,6 +84,8 @@ void eNB_dlsch_ulsch_scheduler_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, uint32_t ab
SIB1_flag
=
0
;
uint32_t
h
,
f
,
sf
;
//int a;
printf
(
"A
\n
"
);
//DEBUG("--------------[%04d][eNB scheduler NB-IoT] Start Scheduling------------\n", mac_inst->current_subframe);
eNB_scheduler_computing_flag_NB_IoT
(
mac_inst
,
abs_subframe
,
&
scheduler_flags
,
&
common_flags
);
/*Update the available resource list to current state*/
...
...
@@ -96,11 +98,14 @@ void eNB_dlsch_ulsch_scheduler_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, uint32_t ab
}
}
}
printf
(
"B
\n
"
);
if
(
scheduler_flags
>
0
){
extend_available_resource_DL
(
mac_inst
,
mac_inst
->
current_subframe
+
1
+
max_subframe
);
}
printf
(
"C
\n
"
);
maintain_available_resource
(
mac_inst
);
//static int test=2;
...
...
@@ -109,17 +114,24 @@ void eNB_dlsch_ulsch_scheduler_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, uint32_t ab
add_UL_Resource
();
}
printf
(
"D
\n
"
);
//Check if type2 searching space scheduling
if
((
scheduler_flags
&
flag_css_type2
)
>
0
){
schedule_RA_NB_IoT
(
mac_inst
);
scheduler_flags
&=
~
(
flag_css_type2
);
}
printf
(
"E
\n
"
);
//Check if type1 searching space scheduling
if
((
scheduler_flags
&
flag_css_type1
)
>
0
){
scheduler_flags
&=
~
(
flag_css_type1
);
}
printf
(
"F
\n
"
);
// loop all USS period
for
(
i
=
0
;
i
<
mac_inst
->
num_uss_list
;
++
i
)
{
...
...
@@ -146,7 +158,11 @@ void eNB_dlsch_ulsch_scheduler_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, uint32_t ab
MIB_flag
=
1
;
if
(
common_flags
==
flag_sib1
)
SIB1_flag
=
1
;
printf
(
"G
\n
"
);
convert_system_number
(
abs_subframe
,
&
h
,
&
f
,
&
sf
);
a
=
output_handler
(
mac_inst
,
0
,
0
,
h
,
f
,
sf
,
MIB_flag
,
SIB1_flag
,
abs_subframe
);
printf
(
"Output_handler_return value : %d"
,
a
);
...
...
openair2/LAYER2/MAC/main_NB_IoT.c
View file @
96e4e6f4
...
...
@@ -247,6 +247,8 @@ int l2_init_eNB_NB_IoT(void)
mac_inst
=
(
eNB_MAC_INST_NB_IoT
*
)
malloc
(
sizeof
(
eNB_MAC_INST_NB_IoT
));
memset
(
mac_inst
,
0
,
sizeof
(
eNB_MAC_INST_NB_IoT
));
Is_rrc_registered_NB_IoT
=
0
;
mac_init_global_param_NB_IoT
();
Is_rrc_registered_NB_IoT
=
1
;
...
...
openair2/LAYER2/MAC/output_handler_NB_IoT.c
View file @
96e4e6f4
...
...
@@ -23,7 +23,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
uint8_t
MIB_size
=
0
;
uint8_t
SIB1_size
=
0
,
i
=
0
;
Sched_Rsp_NB_IoT_t
*
SCHED_info
=
(
Sched_Rsp_NB_IoT_t
*
)
malloc
(
sizeof
(
Sched_Rsp_NB_IoT_t
)
);
Sched_Rsp_NB_IoT_t
*
SCHED_info
=
&
(
mac_inst
->
Sched_INFO
);
nfapi_dl_config_request_pdu_t
*
dl_config_pdu
;
nfapi_hi_dci0_request_pdu_t
*
hi_dci0_pdu
;
nfapi_ul_config_request_pdu_t
*
ul_config_pdu
=
NULL
;
...
...
@@ -270,7 +270,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
if
(
schedule_result_list_UL
==
NULL
)
break
;
}
else
{
printf
(
"error"
);
printf
(
"error
\n
"
);
}
}
}
...
...
openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c
View file @
96e4e6f4
...
...
@@ -10,6 +10,8 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
uint32_t
abs_subframe
;
//UE_TEMPLATE_NB_IoT *UE_info;
/* Disable uplink RX function for now
//If there is a preamble, do the initiate RA procedure
if(UL_INFO->NRACH.number_of_initial_scs_detected>0)
{
...
...
@@ -45,13 +47,13 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
}
}
/
*If there is a Uplink SDU which needs to send to MAC*/
/
/If there is a Uplink SDU which needs to send to MAC
if(UL_INFO->RX_NPUSCH.number_of_pdus>0)
{
for(i=0;i<UL_INFO->RX_NPUSCH.number_of_pdus;i++)
{
/
*For MSG3, Normal Uplink Data, NAK*/
/
/For MSG3, Normal Uplink Data, NAK
rx_sdu_NB_IoT(UL_INFO->module_id,
UL_INFO->CC_id,
UL_INFO->frame,
...
...
@@ -65,9 +67,13 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
}
*/
abs_subframe
=
UL_INFO
->
frame
*
10
+
UL_INFO
->
subframe
;
LOG_I
(
MAC
,
"Enter scheduler in subframe %d
\n
"
,
abs_subframe
);
//scheduler here
//Schedule subframe should be next four subframe, means that UL_INFO->frame*10+UL_INFO->subframe + 4
eNB_dlsch_ulsch_scheduler_NB_IoT
(
mac_inst
,
abs_subframe
);
LOG_I
(
MAC
,
"After scheduler
\n
"
);
}
\ No newline at end of file
targets/RT/USER/lte-enb.c
View file @
96e4e6f4
...
...
@@ -652,6 +652,17 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
/// if (eNB->proc_uespec_rx) eNB->proc_uespec_rx(eNB, proc, no_relay );
////////////////////////////////////END///////////////////////
//////////////////////////////////// for IF Module/scheduler testing
//LOG_I(PHY,"Before UL_indication\n");
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->if_inst->UL_indication(&eNB->UL_INFO);
//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
...
...
@@ -2114,6 +2125,14 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
eNB
->
in_synch
=
0
;
eNB
->
is_slave
=
(
wait_for_sync
>
0
)
?
1
:
0
;
/////// IF-Module initialization ///////////////
LOG_I
(
PHY
,
"Registering with MAC interface module start
\n
"
);
AssertFatal
((
eNB
->
if_inst
=
IF_Module_init_NB_IoT
(
inst
))
!=
NULL
,
"Cannot register interface"
);
eNB
->
if_inst
->
schedule_response
=
schedule_response_NB_IoT
;
eNB
->
if_inst
->
PHY_config_req
=
PHY_config_req_NB_IoT
;
LOG_I
(
PHY
,
"Registering with MAC interface module sucessfully
\n
"
);
#ifndef OCP_FRAMEWORK
LOG_I
(
PHY
,
"Initializing eNB %d CC_id %d : (%s,%s)
\n
"
,
inst
,
CC_id
,
eNB_functions
[
node_function
[
CC_id
]],
eNB_timing
[
node_timing
[
CC_id
]]);
...
...
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