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
8a6260d4
Commit
8a6260d4
authored
Jul 11, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'nr-rrc-additions' into develop-nr
parents
cf3682e3
7cbc0dc1
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
256 additions
and
262 deletions
+256
-262
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
nfapi/oai_integration/nfapi_vnf.c
nfapi/oai_integration/nfapi_vnf.c
+20
-1
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
openair1/SCHED_NR/fapi_nr_l1.c
openair1/SCHED_NR/fapi_nr_l1.c
+114
-0
openair1/SCHED_NR/fapi_nr_l1.h
openair1/SCHED_NR/fapi_nr_l1.h
+41
-0
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
+20
-214
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+5
-5
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+3
-3
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
openair2/RRC/NR/L2_nr_interface.c
openair2/RRC/NR/L2_nr_interface.c
+3
-3
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+1
-1
targets/RT/USER/nr-gnb.c
targets/RT/USER/nr-gnb.c
+8
-7
No files found.
cmake_targets/CMakeLists.txt
View file @
8a6260d4
...
@@ -1023,6 +1023,7 @@ set(SCHED_SRC
...
@@ -1023,6 +1023,7 @@ set(SCHED_SRC
add_library
(
SCHED_LIB
${
SCHED_SRC
}
)
add_library
(
SCHED_LIB
${
SCHED_SRC
}
)
set
(
SCHED_NR_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_common.c
${
OPENAIR1_DIR
}
/SCHED_NR/phy_procedures_nr_gNB.c
${
OPENAIR1_DIR
}
/SCHED_NR/phy_procedures_nr_gNB.c
)
)
...
...
nfapi/oai_integration/nfapi_vnf.c
View file @
8a6260d4
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
#include <netinet/in.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <arpa/inet.h>
#include "nfapi_interface.h"
#include "nfapi_
nr_
interface.h"
#include "nfapi_vnf_interface.h"
#include "nfapi_vnf_interface.h"
#include "nfapi.h"
#include "nfapi.h"
#include "vendor_ext.h"
#include "vendor_ext.h"
...
@@ -1161,6 +1161,25 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req)
...
@@ -1161,6 +1161,25 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req)
return
retval
;
return
retval
;
}
}
int
oai_nfapi_nr_dl_config_req
(
nfapi_nr_dl_config_request_t
*
dl_config_req
)
{
nfapi_vnf_p7_config_t
*
p7_config
=
vnf
.
p7_vnfs
[
0
].
config
;
dl_config_req
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
int
retval
=
nfapi_vnf_p7_dl_config_req
(
p7_config
,
dl_config_req
);
dl_config_req
->
dl_config_request_body
.
number_pdcch_ofdm_symbols
=
1
;
dl_config_req
->
dl_config_request_body
.
number_dci
=
0
;
dl_config_req
->
dl_config_request_body
.
number_pdu
=
0
;
dl_config_req
->
dl_config_request_body
.
number_pdsch_rnti
=
0
;
if
(
retval
!=
0
)
{
LOG_E
(
PHY
,
"%s() Problem sending retval:%d
\n
"
,
__FUNCTION__
,
retval
);
}
return
retval
;
}
int
oai_nfapi_tx_req
(
nfapi_tx_request_t
*
tx_req
)
int
oai_nfapi_tx_req
(
nfapi_tx_request_t
*
tx_req
)
{
{
nfapi_vnf_p7_config_t
*
p7_config
=
vnf
.
p7_vnfs
[
0
].
config
;
nfapi_vnf_p7_config_t
*
p7_config
=
vnf
.
p7_vnfs
[
0
].
config
;
...
...
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h
View file @
8a6260d4
...
@@ -3,6 +3,17 @@
...
@@ -3,6 +3,17 @@
#include "nfapi_interface.h"
#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
//These TLVs are used exclusively by nFAPI
typedef
struct
typedef
struct
{
{
...
@@ -405,18 +416,18 @@ typedef struct {
...
@@ -405,18 +416,18 @@ typedef struct {
union
{
union
{
nfapi_nr_dl_config_dci_dl_pdu_rel15_t
dci_dl_pdu_rel15
;
nfapi_nr_dl_config_dci_dl_pdu_rel15_t
dci_dl_pdu_rel15
;
nfapi_nr_ul_config_dci_ul_pdu_rel15_t
dci_ul_pdu_rel15
;
nfapi_nr_ul_config_dci_ul_pdu_rel15_t
dci_ul_pdu_rel15
;
nfapi_nr_dl_config_bch_pdu_rel15_t
bch_pdu
;
nfapi_nr_dl_config_bch_pdu_rel15_t
bch_pdu
_rel15
;
nfapi_nr_dl_config_dlsch_pdu_rel15_t
dlsch_pdu
;
nfapi_nr_dl_config_dlsch_pdu_rel15_t
dlsch_pdu
_rel15
;
nfapi_nr_dl_config_pch_pdu_rel15_t
pch_pdu
;
nfapi_nr_dl_config_pch_pdu_rel15_t
pch_pdu
_rel15
;
nfapi_nr_dl_config_nbch_pdu_rel15_t
nbch_pdu
;
nfapi_nr_dl_config_nbch_pdu_rel15_t
nbch_pdu
_rel15
;
nfapi_nr_dl_config_npdcch_pdu_rel15_t
npdcch_pdu
;
nfapi_nr_dl_config_npdcch_pdu_rel15_t
npdcch_pdu
_rel15
;
nfapi_nr_dl_config_ndlsch_pdu_rel15_t
ndlsch_pdu
;
nfapi_nr_dl_config_ndlsch_pdu_rel15_t
ndlsch_pdu
_rel15
;
};
};
}
nfapi_nr_dl_config_request_pdu_t
;
}
nfapi_nr_dl_config_request_pdu_t
;
typedef
struct
{
typedef
struct
{
nfapi_tl_t
tl
;
nfapi_tl_t
tl
;
//
uint8_t number_pdcch_ofdm_symbols;
uint8_t
number_pdcch_ofdm_symbols
;
uint8_t
number_dci
;
uint8_t
number_dci
;
uint16_t
number_pdu
;
uint16_t
number_pdu
;
uint8_t
number_pdsch_rnti
;
uint8_t
number_pdsch_rnti
;
...
...
openair1/PHY/INIT/nr_init.c
View file @
8a6260d4
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include "PHY/NR_REFSIG/defs.h"
#include "PHY/NR_REFSIG/defs.h"
#include "PHY/LTE_REFSIG/lte_refsig.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
uint32_t
from_earfcn
(
int
eutra_bandP
,
uint32_t
dl_earfcn
);
extern
int32_t
get_uldl_offset
(
int
eutra_bandP
);
extern
int32_t
get_uldl_offset
(
int
eutra_bandP
);
...
@@ -64,8 +65,8 @@ int l1_north_init_gNB() {
...
@@ -64,8 +65,8 @@ int l1_north_init_gNB() {
LOG_I
(
PHY
,
"%s() RC.gNB[%d][%d] installing callbacks
\n
"
,
__FUNCTION__
,
i
,
j
);
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
->
NR_
PHY_config_req
=
nr_phy_config_request
;
RC
.
gNB
[
i
][
j
]
->
if_inst
->
schedule_response
=
schedule_response
;
RC
.
gNB
[
i
][
j
]
->
if_inst
->
NR_Schedule_response
=
nr_
schedule_response
;
}
}
}
}
}
}
...
...
openair1/SCHED_NR/fapi_nr_l1.c
0 → 100644
View file @
8a6260d4
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file fapi_l1.c
* \brief functions for FAPI L1 interface
* \author R. Knopp
* \date 2017
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr
* \note
* \warning
*/
#include "fapi_nr_l1.h"
int
oai_nfapi_nr_dl_config_req
(
nfapi_nr_dl_config_request_t
*
dl_config_req
);
int
oai_nfapi_tx_req
(
nfapi_tx_request_t
*
tx_req
);
extern
uint8_t
nfapi_mode
;
void
handle_nr_nfapi_bch_pdu
(
PHY_VARS_gNB
*
gNB
,
gNB_rxtx_proc_t
*
proc
,
nfapi_nr_dl_config_request_pdu_t
*
dl_config_pdu
,
uint8_t
*
sdu
)
{
AssertFatal
(
dl_config_pdu
->
bch_pdu_rel15
.
length
==
3
,
"BCH PDU has length %d != 3
\n
"
,
dl_config_pdu
->
bch_pdu_rel15
.
length
);
LOG_D
(
PHY
,
"bch_pdu: %x,%x,%x
\n
"
,
sdu
[
0
],
sdu
[
1
],
sdu
[
2
]);
gNB
->
pbch_pdu
[
0
]
=
sdu
[
2
];
gNB
->
pbch_pdu
[
1
]
=
sdu
[
1
];
gNB
->
pbch_pdu
[
2
]
=
sdu
[
0
];
// adjust transmit amplitude here based on NFAPI info
}
void
nr_schedule_response
(
NR_Sched_Rsp_t
*
Sched_INFO
){
PHY_VARS_gNB
*
gNB
;
gNB_rxtx_proc_t
*
proc
;
// copy data from L2 interface into L1 structures
module_id_t
Mod_id
=
Sched_INFO
->
module_id
;
uint8_t
CC_id
=
Sched_INFO
->
CC_id
;
nfapi_nr_dl_config_request_t
*
DL_req
=
Sched_INFO
->
DL_req
;
nfapi_tx_request_t
*
TX_req
=
Sched_INFO
->
TX_req
;
frame_t
frame
=
Sched_INFO
->
frame
;
sub_frame_t
subframe
=
Sched_INFO
->
subframe
;
AssertFatal
(
RC
.
gNB
!=
NULL
,
"RC.gNB is null
\n
"
);
AssertFatal
(
RC
.
gNB
[
Mod_id
]
!=
NULL
,
"RC.gNB[%d] is null
\n
"
,
Mod_id
);
AssertFatal
(
RC
.
gNB
[
Mod_id
][
CC_id
]
!=
NULL
,
"RC.gNB[%d][%d] is null
\n
"
,
Mod_id
,
CC_id
);
gNB
=
RC
.
gNB
[
Mod_id
][
CC_id
];
proc
=
&
gNB
->
proc
.
proc_rxtx
[
0
];
uint8_t
number_dl_pdu
=
DL_req
->
dl_config_request_body
.
number_pdu
;
nfapi_nr_dl_config_request_pdu_t
*
dl_config_pdu
;
int
i
;
LOG_D
(
PHY
,
"NFAPI: Sched_INFO:SFN/SF:%04d%d DL_req:SFN/SF:%04d%d:dl_pdu:%d tx_req:SFN/SF:%04d%d:pdus:%d
\n
"
,
frame
,
subframe
,
NFAPI_SFNSF2SFN
(
DL_req
->
sfn_sf
),
NFAPI_SFNSF2SF
(
DL_req
->
sfn_sf
),
number_dl_pdu
,
NFAPI_SFNSF2SFN
(
TX_req
->
sfn_sf
),
NFAPI_SFNSF2SF
(
TX_req
->
sfn_sf
),
TX_req
->
tx_request_body
.
number_of_pdus
);
int
do_oai
=
0
;
int
dont_send
=
0
;
for
(
i
=
0
;
i
<
number_dl_pdu
;
i
++
)
{
dl_config_pdu
=
&
DL_req
->
dl_config_request_body
.
dl_config_pdu_list
[
i
];
//LOG_D(PHY,"NFAPI: dl_pdu %d : type %d\n",i,dl_config_pdu->pdu_type);
switch
(
dl_config_pdu
->
pdu_type
)
{
case
NFAPI_NR_DL_CONFIG_BCH_PDU_TYPE
:
AssertFatal
(
dl_config_pdu
->
bch_pdu_rel15
.
pdu_index
<
TX_req
->
tx_request_body
.
number_of_pdus
,
"bch_pdu_rel8.pdu_index>=TX_req->number_of_pdus (%d>%d)
\n
"
,
dl_config_pdu
->
bch_pdu_rel15
.
pdu_index
,
TX_req
->
tx_request_body
.
number_of_pdus
);
gNB
->
pbch_configured
=
1
;
do_oai
=
1
;
handle_nr_nfapi_bch_pdu
(
gNB
,
proc
,
dl_config_pdu
,
TX_req
->
tx_request_body
.
tx_pdu_list
[
dl_config_pdu
->
bch_pdu_rel15
.
pdu_index
].
segments
[
0
].
segment_data
);
break
;
}
}
if
(
nfapi_mode
&&
do_oai
&&
!
dont_send
)
{
oai_nfapi_tx_req
(
Sched_INFO
->
TX_req
);
oai_nfapi_nr_dl_config_req
(
Sched_INFO
->
DL_req
);
// DJP - .dl_config_request_body.dl_config_pdu_list[0]); // DJP - FIXME TODO - yuk - only copes with 1 pdu
}
}
\ No newline at end of file
openair1/SCHED_NR/fapi_nr_l1.h
0 → 100644
View file @
8a6260d4
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file fapi_l1.h
* \brief function prototypes for FAPI L1 interface
* \author R. Knopp
* \date 2017
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr
* \note
* \warning
*/
#include "PHY/defs_gNB.h"
#include "PHY/phy_extern.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "SCHED/sched_eNB.h"
#include "SCHED/sched_common.h"
#include "SCHED_NR/sched_nr.h"
#include "nfapi_nr_interface.h"
void
nr_schedule_response
(
NR_Sched_Rsp_t
*
Sched_INFO
);
\ No newline at end of file
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
8a6260d4
...
@@ -215,11 +215,11 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
...
@@ -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 in nFAPI mode
if
(
(
nfapi_mode
==
1
||
nfapi_mode
==
2
)
&&
(
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
->
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");
// DJP AssertFatal(RC.nrmac[Mod_idP]->if_inst->PHY_config_req != NULL,"if_inst->phy_config_request is null\n");
usleep
(
100
*
1000
);
usleep
(
100
*
1000
);
printf
(
"Waiting for PHY_config_req
\n
"
);
printf
(
"Waiting for PHY_config_req
\n
"
);
...
@@ -232,7 +232,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
...
@@ -232,7 +232,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
phycfg
.
CC_id
=
CC_idP
;
phycfg
.
CC_id
=
CC_idP
;
phycfg
.
cfg
=
&
RC
.
nrmac
[
Mod_idP
]
->
config
[
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
);
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 @
8a6260d4
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
8a6260d4
...
@@ -94,12 +94,12 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subfram
...
@@ -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
];
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
));
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
->
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
_rel15
.
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
_rel15
.
length
=
mib_sdu_length
;
dl_config_pdu
->
bch_pdu
.
pdu_index
=
gNB
->
pdu_index
[
CC_id
];
dl_config_pdu
->
bch_pdu
_rel15
.
pdu_index
=
gNB
->
pdu_index
[
CC_id
];
dl_config_pdu
->
bch_pdu
.
transmission_power
=
6000
;
dl_config_pdu
->
bch_pdu
_rel15
.
transmission_power
=
6000
;
dl_req
->
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_BODY_TAG
;
dl_req
->
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_BODY_TAG
;
dl_req
->
number_pdu
++
;
dl_req
->
number_pdu
++
;
dl_config_request
->
header
.
message_id
=
NFAPI_DL_CONFIG_REQUEST
;
dl_config_request
->
header
.
message_id
=
NFAPI_DL_CONFIG_REQUEST
;
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
8a6260d4
...
@@ -45,7 +45,7 @@ extern RAN_CONTEXT_t RC;
...
@@ -45,7 +45,7 @@ extern RAN_CONTEXT_t RC;
void
mac_top_init_gNB
(
void
)
void
mac_top_init_gNB
(
void
)
{
{
module_id_t
i
;
module_id_t
i
,
j
;
int
list_el
;
int
list_el
;
UE_list_t
*
UE_list
;
UE_list_t
*
UE_list
;
gNB_MAC_INST
*
nrmac
;
gNB_MAC_INST
*
nrmac
;
...
@@ -73,7 +73,7 @@ void mac_top_init_gNB(void)
...
@@ -73,7 +73,7 @@ void mac_top_init_gNB(void)
RC
.
nrmac
[
i
]
->
Mod_id
=
i
;
RC
.
nrmac
[
i
]
->
Mod_id
=
i
;
/*
for
(
j
=
0
;
j
<
MAX_NUM_CCs
;
j
++
)
{
for
(
j
=
0
;
j
<
MAX_NUM_CCs
;
j
++
)
{
RC
.
nrmac
[
i
]
->
DL_req
[
j
].
dl_config_request_body
.
dl_config_pdu_list
=
RC
.
nrmac
[
i
]
->
dl_config_pdu_list
[
j
];
RC
.
nrmac
[
i
]
->
DL_req
[
j
].
dl_config_request_body
.
dl_config_pdu_list
=
RC
.
nrmac
[
i
]
->
dl_config_pdu_list
[
j
];
RC
.
nrmac
[
i
]
->
UL_req
[
j
].
ul_config_request_body
.
ul_config_pdu_list
=
RC
.
nrmac
[
i
]
->
ul_config_pdu_list
[
j
];
RC
.
nrmac
[
i
]
->
UL_req
[
j
].
ul_config_request_body
.
ul_config_pdu_list
=
RC
.
nrmac
[
i
]
->
ul_config_pdu_list
[
j
];
...
@@ -85,7 +85,7 @@ void mac_top_init_gNB(void)
...
@@ -85,7 +85,7 @@ void mac_top_init_gNB(void)
RC
.
nrmac
[
i
]
->
TX_req
[
j
].
tx_request_body
.
tx_pdu_list
=
RC
.
nrmac
[
i
]
->
tx_request_pdu
[
j
];
RC
.
nrmac
[
i
]
->
TX_req
[
j
].
tx_request_body
.
tx_pdu_list
=
RC
.
nrmac
[
i
]
->
tx_request_pdu
[
j
];
RC
.
nrmac
[
i
]
->
ul_handle
=
0
;
RC
.
nrmac
[
i
]
->
ul_handle
=
0
;
}
}
*/
}
//END for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
}
//END for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
8a6260d4
#include "openair1/PHY/defs_eNB.h"
#include "openair1/PHY/defs_eNB.h"
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
#include "openair1/PHY/phy_extern.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_extern.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/NR_MAC_gNB/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)
...
@@ -262,8 +263,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
// clear DL/UL info for new scheduling round
// clear DL/UL info for new scheduling round
clear_nfapi_information
(
RC
.
mac
[
module_id
],
CC_id
,
clear_nr_nfapi_information
(
RC
.
nrmac
[
module_id
],
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
);
UL_info
->
frame
,
UL_info
->
subframe
);
handle_nr_rach
(
UL_info
);
handle_nr_rach
(
UL_info
);
...
@@ -311,16 +311,16 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
...
@@ -311,16 +311,16 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
dump_dl
(
sched_info
);
dump_dl
(
sched_info
);
#endif
#endif
if
(
ifi
->
s
chedule_response
)
if
(
ifi
->
NR_S
chedule_response
)
{
{
AssertFatal
(
ifi
->
s
chedule_response
!=
NULL
,
AssertFatal
(
ifi
->
NR_S
chedule_response
!=
NULL
,
"
schedule_response is null (mod %d, cc %d)
\n
"
,
"nr_
schedule_response is null (mod %d, cc %d)
\n
"
,
module_id
,
module_id
,
CC_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){
...
@@ -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
));
memset
((
void
*
)
if_inst
[
Mod_id
],
0
,
sizeof
(
NR_IF_Module_t
));
if_inst
[
Mod_id
]
->
CC_mask
=
0
;
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
,
AssertFatal
(
pthread_mutex_init
(
&
if_inst
[
Mod_id
]
->
if_mutex
,
NULL
)
==
0
,
"allocation of if_inst[%d]->if_mutex fails
\n
"
,
Mod_id
);
"allocation of if_inst[%d]->if_mutex fails
\n
"
,
Mod_id
);
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.h
View file @
8a6260d4
...
@@ -100,7 +100,7 @@ typedef struct{
...
@@ -100,7 +100,7 @@ typedef struct{
/// subframe
/// subframe
sub_frame_t
subframe
;
sub_frame_t
subframe
;
/// nFAPI DL Config Request
/// 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
nfapi_ul_config_request_t
*
UL_req
;
nfapi_ul_config_request_t
*
UL_req
;
/// nFAPI HI_DCI Request
/// nFAPI HI_DCI Request
...
@@ -117,9 +117,9 @@ typedef struct {
...
@@ -117,9 +117,9 @@ typedef struct {
typedef
struct
NR_IF_Module_s
{
typedef
struct
NR_IF_Module_s
{
//define the function pointer
//define the function pointer
void
(
*
UL_indication
)(
NR_UL_IND_t
*
UL_INFO
);
void
(
*
NR_
UL_indication
)(
NR_UL_IND_t
*
UL_INFO
);
void
(
*
s
chedule_response
)(
NR_Sched_Rsp_t
*
Sched_INFO
);
void
(
*
NR_S
chedule_response
)(
NR_Sched_Rsp_t
*
Sched_INFO
);
void
(
*
PHY_config_req
)(
NR_PHY_Config_t
*
config_INFO
);
void
(
*
NR_
PHY_config_req
)(
NR_PHY_Config_t
*
config_INFO
);
uint32_t
CC_mask
;
uint32_t
CC_mask
;
uint16_t
current_frame
;
uint16_t
current_frame
;
uint8_t
current_subframe
;
uint8_t
current_subframe
;
...
...
openair2/RRC/NR/L2_nr_interface.c
View file @
8a6260d4
...
@@ -20,9 +20,9 @@ int8_t mac_rrc_nr_data_req(const module_id_t Mod_idP,
...
@@ -20,9 +20,9 @@ int8_t mac_rrc_nr_data_req(const module_id_t Mod_idP,
uint8_t
*
const
buffer_pP
){
uint8_t
*
const
buffer_pP
){
asn_enc_rval_t
enc_rval
;
asn_enc_rval_t
enc_rval
;
SRB_INFO
*
Srb_info
;
//
SRB_INFO *Srb_info;
uint8_t
Sdu_size
=
0
;
//
uint8_t Sdu_size = 0;
uint8_t
sfn
=
(
uint8_t
)((
frameP
>>
2
)
&
0xff
);
uint8_t
sfn
=
(
uint8_t
)((
frameP
>>
4
)
&
0xff
);
#ifdef DEBUG_RRC
#ifdef DEBUG_RRC
int
i
;
int
i
;
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
8a6260d4
...
@@ -205,7 +205,7 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier,
...
@@ -205,7 +205,7 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier,
mib
->
message
.
choice
.
mib
=
CALLOC
(
1
,
sizeof
(
struct
NR_MIB
));
mib
->
message
.
choice
.
mib
=
CALLOC
(
1
,
sizeof
(
struct
NR_MIB
));
memset
(
mib
->
message
.
choice
.
mib
,
0
,
sizeof
(
struct
NR_MIB
));
memset
(
mib
->
message
.
choice
.
mib
,
0
,
sizeof
(
struct
NR_MIB
));
//36.331 SFN BIT STRING (SIZE (8) , 38.331 SFN BIT STRING (SIZE (6))
//36.331 SFN BIT STRING (SIZE (8) , 38.331 SFN BIT STRING (SIZE (6))
uint8_t
sfn
=
(
uint8_t
)((
frame
>>
2
)
&
0x3
f
);
uint8_t
sfn
=
(
uint8_t
)((
frame
>>
4
)
&
0xf
f
);
mib
->
message
.
choice
.
mib
->
systemFrameNumber
.
buf
=
&
sfn
;
mib
->
message
.
choice
.
mib
->
systemFrameNumber
.
buf
=
&
sfn
;
mib
->
message
.
choice
.
mib
->
systemFrameNumber
.
size
=
1
;
mib
->
message
.
choice
.
mib
->
systemFrameNumber
.
size
=
1
;
mib
->
message
.
choice
.
mib
->
systemFrameNumber
.
bits_unused
=
0
;
mib
->
message
.
choice
.
mib
->
systemFrameNumber
.
bits_unused
=
0
;
...
...
targets/RT/USER/nr-gnb.c
View file @
8a6260d4
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
#include "PHY/defs_gNB.h"
#include "PHY/defs_gNB.h"
#include "SCHED/sched_eNB.h"
#include "SCHED/sched_eNB.h"
#include "SCHED_NR/sched_nr.h"
#include "SCHED_NR/sched_nr.h"
#include "SCHED_NR/fapi_nr_l1.h"
#include "PHY/LTE_TRANSPORT/transport_proto.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
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
...
@@ -196,12 +197,12 @@ static inline int rxtx(PHY_VARS_gNB *gNB,gNB_rxtx_proc_t *proc, char *thread_nam
...
@@ -196,12 +197,12 @@ static inline int rxtx(PHY_VARS_gNB *gNB,gNB_rxtx_proc_t *proc, char *thread_nam
return
0
;
return
0
;
}
}
/// NR disabling
/// NR disabling
/*
// ****************************************
// ****************************************
// Common RX procedures subframe n
// Common RX procedures subframe n
T
(
T_gNB_PHY_DL_TICK
,
T_INT
(
gNB
->
Mod_id
),
T_INT
(
proc
->
frame_tx
),
T_INT
(
proc
->
subframe_tx
));
T
(
T_gNB_PHY_DL_TICK
,
T_INT
(
gNB
->
Mod_id
),
T_INT
(
proc
->
frame_tx
),
T_INT
(
proc
->
subframe_tx
));
/*
// if this is IF5 or 3GPP_gNB
// if this is IF5 or 3GPP_gNB
if (gNB && gNB->RU_list && gNB->RU_list[0] && gNB->RU_list[0]->function < NGFI_RAU_IF4p5) {
if (gNB && gNB->RU_list && gNB->RU_list[0] && gNB->RU_list[0]->function < NGFI_RAU_IF4p5) {
wakeup_prach_gNB(gNB,NULL,proc->frame_rx,proc->subframe_rx);
wakeup_prach_gNB(gNB,NULL,proc->frame_rx,proc->subframe_rx);
...
@@ -211,7 +212,7 @@ static inline int rxtx(PHY_VARS_gNB *gNB,gNB_rxtx_proc_t *proc, char *thread_nam
...
@@ -211,7 +212,7 @@ static inline int rxtx(PHY_VARS_gNB *gNB,gNB_rxtx_proc_t *proc, char *thread_nam
if (nfapi_mode == 0 || nfapi_mode == 1) {
if (nfapi_mode == 0 || nfapi_mode == 1) {
phy_procedures_gNB_uespec_RX(gNB, proc, no_relay );
phy_procedures_gNB_uespec_RX(gNB, proc, no_relay );
}
}
*/
pthread_mutex_lock
(
&
gNB
->
UL_INFO_mutex
);
pthread_mutex_lock
(
&
gNB
->
UL_INFO_mutex
);
gNB
->
UL_INFO
.
frame
=
proc
->
frame_rx
;
gNB
->
UL_INFO
.
frame
=
proc
->
frame_rx
;
...
@@ -219,10 +220,10 @@ static inline int rxtx(PHY_VARS_gNB *gNB,gNB_rxtx_proc_t *proc, char *thread_nam
...
@@ -219,10 +220,10 @@ static inline int rxtx(PHY_VARS_gNB *gNB,gNB_rxtx_proc_t *proc, char *thread_nam
gNB
->
UL_INFO
.
module_id
=
gNB
->
Mod_id
;
gNB
->
UL_INFO
.
module_id
=
gNB
->
Mod_id
;
gNB
->
UL_INFO
.
CC_id
=
gNB
->
CC_id
;
gNB
->
UL_INFO
.
CC_id
=
gNB
->
CC_id
;
gNB->if_inst->UL_indication(&gNB->UL_INFO);
gNB
->
if_inst
->
NR_
UL_indication
(
&
gNB
->
UL_INFO
);
pthread_mutex_unlock
(
&
gNB
->
UL_INFO_mutex
);
pthread_mutex_unlock
(
&
gNB
->
UL_INFO_mutex
);
*/
/// end
/// end
// *****************************************
// *****************************************
// TX processing for subframe n+sf_ahead
// TX processing for subframe n+sf_ahead
...
@@ -928,8 +929,8 @@ void init_gNB(int single_thread_flag,int wait_for_sync) {
...
@@ -928,8 +929,8 @@ void init_gNB(int single_thread_flag,int wait_for_sync) {
LOG_I
(
PHY
,
"Registering with MAC interface module
\n
"
);
LOG_I
(
PHY
,
"Registering with MAC interface module
\n
"
);
AssertFatal
((
gNB
->
if_inst
=
NR_IF_Module_init
(
inst
))
!=
NULL
,
"Cannot register interface"
);
AssertFatal
((
gNB
->
if_inst
=
NR_IF_Module_init
(
inst
))
!=
NULL
,
"Cannot register interface"
);
gNB
->
if_inst
->
schedule_response
=
schedule_response
;
gNB
->
if_inst
->
NR_Schedule_response
=
nr_
schedule_response
;
gNB
->
if_inst
->
PHY_config_req
=
nr_phy_config_request
;
gNB
->
if_inst
->
NR_
PHY_config_req
=
nr_phy_config_request
;
memset
((
void
*
)
&
gNB
->
UL_INFO
,
0
,
sizeof
(
gNB
->
UL_INFO
));
memset
((
void
*
)
&
gNB
->
UL_INFO
,
0
,
sizeof
(
gNB
->
UL_INFO
));
memset
((
void
*
)
&
gNB
->
Sched_INFO
,
0
,
sizeof
(
gNB
->
Sched_INFO
));
memset
((
void
*
)
&
gNB
->
Sched_INFO
,
0
,
sizeof
(
gNB
->
Sched_INFO
));
LOG_I
(
PHY
,
"Setting indication lists
\n
"
);
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