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
f95989e7
Commit
f95989e7
authored
Jul 10, 2018
by
WEI-TAI CHEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding function NR_UL_indication
parent
3e54d86e
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
51 additions
and
37 deletions
+51
-37
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h
+18
-7
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+3
-2
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+4
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+2
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+5
-5
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+11
-11
openair2/NR_PHY_INTERFACE/NR_IF_Module.h
openair2/NR_PHY_INTERFACE/NR_IF_Module.h
+4
-4
targets/RT/USER/nr-gnb.c
targets/RT/USER/nr-gnb.c
+3
-2
No files found.
cmake_targets/CMakeLists.txt
View file @
f95989e7
...
...
@@ -1023,6 +1023,7 @@ set(SCHED_SRC
add_library
(
SCHED_LIB
${
SCHED_SRC
}
)
set
(
SCHED_NR_SRC
${
OPENAIR1_DIR
}
/SCHED_NR/fapi_nr_l1.c
${
OPENAIR1_DIR
}
/SCHED_NR/phy_procedures_nr_common.c
${
OPENAIR1_DIR
}
/SCHED_NR/phy_procedures_nr_gNB.c
)
...
...
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h
View file @
f95989e7
...
...
@@ -3,6 +3,17 @@
#include "nfapi_interface.h"
// nFAPI enums
typedef
enum
{
NFAPI_NR_DL_CONFIG_DCI_DL_PDU_TYPE
=
0
,
NFAPI_NR_DL_CONFIG_BCH_PDU_TYPE
,
NFAPI_NR_DL_CONFIG_DLSCH_PDU_TYPE
,
NFAPI_NR_DL_CONFIG_PCH_PDU_TYPE
,
NFAPI_NR_DL_CONFIG_NBCH_PDU_TYPE
,
NFAPI_NR_DL_CONFIG_NPDCCH_PDU_TYPE
,
NFAPI_NR_DL_CONFIG_NDLSCH_PDU_TYPE
}
nfapi_nr_dl_config_pdu_type_e
;
//These TLVs are used exclusively by nFAPI
typedef
struct
{
...
...
@@ -307,13 +318,13 @@ typedef struct {
uint8_t
pdu_type
;
uint8_t
pdu_size
;
union
{
nfapi_nr_dl_config_dci_dl_pdu_rel15_t
dci_dl_pdu
;
nfapi_nr_dl_config_bch_pdu_rel15_t
bch_pdu
;
nfapi_nr_dl_config_dlsch_pdu_rel15_t
dlsch_pdu
;
nfapi_nr_dl_config_pch_pdu_rel15_t
pch_pdu
;
nfapi_nr_dl_config_nbch_pdu_rel15_t
nbch_pdu
;
nfapi_nr_dl_config_npdcch_pdu_rel15_t
npdcch_pdu
;
nfapi_nr_dl_config_ndlsch_pdu_rel15_t
ndlsch_pdu
;
nfapi_nr_dl_config_dci_dl_pdu_rel15_t
dci_dl_pdu
_rel15
;
nfapi_nr_dl_config_bch_pdu_rel15_t
bch_pdu
_rel15
;
nfapi_nr_dl_config_dlsch_pdu_rel15_t
dlsch_pdu
_rel15
;
nfapi_nr_dl_config_pch_pdu_rel15_t
pch_pdu
_rel15
;
nfapi_nr_dl_config_nbch_pdu_rel15_t
nbch_pdu
_rel15
;
nfapi_nr_dl_config_npdcch_pdu_rel15_t
npdcch_pdu
_rel15
;
nfapi_nr_dl_config_ndlsch_pdu_rel15_t
ndlsch_pdu
_rel15
;
};
}
nfapi_nr_dl_config_request_pdu_t
;
...
...
openair1/PHY/INIT/nr_init.c
View file @
f95989e7
...
...
@@ -35,6 +35,7 @@
#include "PHY/NR_REFSIG/defs.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "SCHED_NR/fapi_nr_l1.h"
extern
uint32_t
from_earfcn
(
int
eutra_bandP
,
uint32_t
dl_earfcn
);
extern
int32_t
get_uldl_offset
(
int
eutra_bandP
);
...
...
@@ -64,8 +65,8 @@ int l1_north_init_gNB() {
LOG_I
(
PHY
,
"%s() RC.gNB[%d][%d] installing callbacks
\n
"
,
__FUNCTION__
,
i
,
j
);
RC
.
gNB
[
i
][
j
]
->
if_inst
->
PHY_config_req
=
nr_phy_config_request
;
RC
.
gNB
[
i
][
j
]
->
if_inst
->
schedule_response
=
schedule_response
;
RC
.
gNB
[
i
][
j
]
->
if_inst
->
NR_
PHY_config_req
=
nr_phy_config_request
;
RC
.
gNB
[
i
][
j
]
->
if_inst
->
NR_Schedule_response
=
nr_
schedule_response
;
}
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
f95989e7
...
...
@@ -215,11 +215,11 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
LOG_E
(
MAC
,
"%s() %s:%d RC.nrmac[Mod_idP]->if_inst->
PHY_config_req:%p
\n
"
,
__FUNCTION__
,
__FILE__
,
__LINE__
,
RC
.
nrmac
[
Mod_idP
]
->
if_inst
->
PHY_config_req
);
LOG_E
(
MAC
,
"%s() %s:%d RC.nrmac[Mod_idP]->if_inst->
NR_PHY_config_req:%p
\n
"
,
__FUNCTION__
,
__FILE__
,
__LINE__
,
RC
.
nrmac
[
Mod_idP
]
->
if_inst
->
NR_
PHY_config_req
);
// if in nFAPI mode
if
(
(
nfapi_mode
==
1
||
nfapi_mode
==
2
)
&&
(
RC
.
nrmac
[
Mod_idP
]
->
if_inst
->
PHY_config_req
==
NULL
)
){
while
(
RC
.
nrmac
[
Mod_idP
]
->
if_inst
->
PHY_config_req
==
NULL
)
{
if
(
(
nfapi_mode
==
1
||
nfapi_mode
==
2
)
&&
(
RC
.
nrmac
[
Mod_idP
]
->
if_inst
->
NR_
PHY_config_req
==
NULL
)
){
while
(
RC
.
nrmac
[
Mod_idP
]
->
if_inst
->
NR_
PHY_config_req
==
NULL
)
{
// DJP AssertFatal(RC.nrmac[Mod_idP]->if_inst->PHY_config_req != NULL,"if_inst->phy_config_request is null\n");
usleep
(
100
*
1000
);
printf
(
"Waiting for PHY_config_req
\n
"
);
...
...
@@ -232,7 +232,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
phycfg
.
CC_id
=
CC_idP
;
phycfg
.
cfg
=
&
RC
.
nrmac
[
Mod_idP
]
->
config
[
CC_idP
];
if
(
RC
.
nrmac
[
Mod_idP
]
->
if_inst
->
PHY_config_req
)
RC
.
nrmac
[
Mod_idP
]
->
if_inst
->
PHY_config_req
(
&
phycfg
);
if
(
RC
.
nrmac
[
Mod_idP
]
->
if_inst
->
NR_PHY_config_req
)
RC
.
nrmac
[
Mod_idP
]
->
if_inst
->
NR_
PHY_config_req
(
&
phycfg
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG
,
VCD_FUNCTION_OUT
);
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
f95989e7
...
...
@@ -612,7 +612,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
if
((
subframeP
==
0
)
&&
(
frameP
&
7
)
==
0
){
schedule_nr_mib
(
module_idP
,
frameP
,
subframeP
);
}
/*
if (phy_test == 0){
// This schedules SI for legacy LTE and eMTC starting in subframeP
schedule_SI(module_idP, frameP, subframeP);
...
...
@@ -637,7 +637,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
schedule_ulsch_phy_test(module_idP,frameP,subframeP);
schedule_ue_spec_phy_test(module_idP,frameP,subframeP,mbsfn_status);
}
*/
if
(
RC
.
flexran
[
module_idP
]
->
enabled
)
flexran_agent_send_update_stats
(
module_idP
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
f95989e7
...
...
@@ -94,12 +94,12 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subfram
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_nr_dl_config_request_pdu_t
));
dl_config_pdu
->
pdu_type
=
NFAPI_DL_CONFIG_BCH_PDU_TYPE
;
dl_config_pdu
->
pdu_type
=
NFAPI_
NR_
DL_CONFIG_BCH_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
2
+
sizeof
(
nfapi_nr_dl_config_bch_pdu_rel15_t
);
dl_config_pdu
->
bch_pdu
.
tl
.
tag
=
NFAPI_NR_DL_CONFIG_REQUEST_BCH_PDU_REL15_TAG
;
dl_config_pdu
->
bch_pdu
.
length
=
mib_sdu_length
;
dl_config_pdu
->
bch_pdu
.
pdu_index
=
gNB
->
pdu_index
[
CC_id
];
dl_config_pdu
->
bch_pdu
.
transmission_power
=
6000
;
dl_config_pdu
->
bch_pdu
_rel15
.
tl
.
tag
=
NFAPI_NR_DL_CONFIG_REQUEST_BCH_PDU_REL15_TAG
;
dl_config_pdu
->
bch_pdu
_rel15
.
length
=
mib_sdu_length
;
dl_config_pdu
->
bch_pdu
_rel15
.
pdu_index
=
gNB
->
pdu_index
[
CC_id
];
dl_config_pdu
->
bch_pdu
_rel15
.
transmission_power
=
6000
;
dl_req
->
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_BODY_TAG
;
dl_req
->
number_pdu
++
;
dl_config_request
->
header
.
message_id
=
NFAPI_DL_CONFIG_REQUEST
;
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
f95989e7
#include "openair1/PHY/defs_eNB.h"
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
#include "openair1/PHY/phy_extern.h"
#include "openair1/SCHED_NR/fapi_nr_l1.h"
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
...
...
@@ -262,8 +263,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
// clear DL/UL info for new scheduling round
clear_nfapi_information
(
RC
.
mac
[
module_id
],
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
);
clear_nfapi_information
(
RC
.
nrmac
[
module_id
],
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
);
handle_nr_rach
(
UL_info
);
...
...
@@ -311,16 +311,16 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
dump_dl
(
sched_info
);
#endif
if
(
ifi
->
s
chedule_response
)
if
(
ifi
->
NR_S
chedule_response
)
{
AssertFatal
(
ifi
->
s
chedule_response
!=
NULL
,
"
schedule_response is null (mod %d, cc %d)
\n
"
,
AssertFatal
(
ifi
->
NR_S
chedule_response
!=
NULL
,
"nr_
schedule_response is null (mod %d, cc %d)
\n
"
,
module_id
,
CC_id
);
ifi
->
s
chedule_response
(
sched_info
);
ifi
->
NR_S
chedule_response
(
sched_info
);
}
LOG_D
(
PHY
,
"Schedule_response: SFN_SF:%d%d dl_pdus:%d
\n
"
,
sched_info
->
frame
,
sched_info
->
subframe
,
sched_info
->
DL_req
->
dl_config_request_body
.
number_pdu
);
LOG_D
(
PHY
,
"
NR_
Schedule_response: SFN_SF:%d%d dl_pdus:%d
\n
"
,
sched_info
->
frame
,
sched_info
->
subframe
,
sched_info
->
DL_req
->
dl_config_request_body
.
number_pdu
);
}
}
}
...
...
@@ -336,7 +336,7 @@ NR_IF_Module_t *NR_IF_Module_init(int Mod_id){
memset
((
void
*
)
if_inst
[
Mod_id
],
0
,
sizeof
(
NR_IF_Module_t
));
if_inst
[
Mod_id
]
->
CC_mask
=
0
;
if_inst
[
Mod_id
]
->
UL_indication
=
NR_UL_indication
;
if_inst
[
Mod_id
]
->
NR_
UL_indication
=
NR_UL_indication
;
AssertFatal
(
pthread_mutex_init
(
&
if_inst
[
Mod_id
]
->
if_mutex
,
NULL
)
==
0
,
"allocation of if_inst[%d]->if_mutex fails
\n
"
,
Mod_id
);
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.h
View file @
f95989e7
...
...
@@ -100,7 +100,7 @@ typedef struct{
/// subframe
sub_frame_t
subframe
;
/// nFAPI DL Config Request
nfapi_dl_config_request_t
*
DL_req
;
nfapi_
nr_
dl_config_request_t
*
DL_req
;
/// nFAPI UL Config Request
nfapi_ul_config_request_t
*
UL_req
;
/// nFAPI HI_DCI Request
...
...
@@ -117,9 +117,9 @@ typedef struct {
typedef
struct
NR_IF_Module_s
{
//define the function pointer
void
(
*
UL_indication
)(
NR_UL_IND_t
*
UL_INFO
);
void
(
*
s
chedule_response
)(
NR_Sched_Rsp_t
*
Sched_INFO
);
void
(
*
PHY_config_req
)(
NR_PHY_Config_t
*
config_INFO
);
void
(
*
NR_
UL_indication
)(
NR_UL_IND_t
*
UL_INFO
);
void
(
*
NR_S
chedule_response
)(
NR_Sched_Rsp_t
*
Sched_INFO
);
void
(
*
NR_
PHY_config_req
)(
NR_PHY_Config_t
*
config_INFO
);
uint32_t
CC_mask
;
uint16_t
current_frame
;
uint8_t
current_subframe
;
...
...
targets/RT/USER/nr-gnb.c
View file @
f95989e7
...
...
@@ -49,6 +49,7 @@
#include "PHY/defs_gNB.h"
#include "SCHED/sched_eNB.h"
#include "SCHED_NR/sched_nr.h"
#include "SCHED_NR/fapi_nr_l1.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
...
...
@@ -928,8 +929,8 @@ void init_gNB(int single_thread_flag,int wait_for_sync) {
LOG_I
(
PHY
,
"Registering with MAC interface module
\n
"
);
AssertFatal
((
gNB
->
if_inst
=
NR_IF_Module_init
(
inst
))
!=
NULL
,
"Cannot register interface"
);
gNB
->
if_inst
->
schedule_response
=
schedule_response
;
gNB
->
if_inst
->
PHY_config_req
=
nr_phy_config_request
;
gNB
->
if_inst
->
NR_Schedule_response
=
nr_
schedule_response
;
gNB
->
if_inst
->
NR_
PHY_config_req
=
nr_phy_config_request
;
memset
((
void
*
)
&
gNB
->
UL_INFO
,
0
,
sizeof
(
gNB
->
UL_INFO
));
memset
((
void
*
)
&
gNB
->
Sched_INFO
,
0
,
sizeof
(
gNB
->
Sched_INFO
));
LOG_I
(
PHY
,
"Setting indication lists
\n
"
);
...
...
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