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
5eb919e2
Commit
5eb919e2
authored
Jun 22, 2018
by
WEI-TAI CHEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify nr_phy_config_request for testing config. module
parent
d78218b2
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
71 additions
and
11 deletions
+71
-11
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+64
-4
openair1/PHY/INIT/phy_init.h
openair1/PHY/INIT/phy_init.h
+1
-1
openair1/PHY/defs_NR.h
openair1/PHY/defs_NR.h
+1
-1
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+1
-1
openair2/LAYER2/NR_MAC_gNB/mac.h
openair2/LAYER2/NR_MAC_gNB/mac.h
+1
-1
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+1
-1
openair2/NR_PHY_INTERFACE/NR_IF_Module.h
openair2/NR_PHY_INTERFACE/NR_IF_Module.h
+0
-0
targets/RT/USER/nr-ru.c
targets/RT/USER/nr-ru.c
+1
-1
No files found.
cmake_targets/CMakeLists.txt
View file @
5eb919e2
...
...
@@ -1452,7 +1452,7 @@ set (MAC_SRC
${
MAC_DIR
}
/pre_processor.c
${
MAC_DIR
}
/config.c
${
MAC_DIR
}
/config_ue.c
${
NR_PHY_INTERFACE_DIR
}
/IF_Module.c
${
NR_PHY_INTERFACE_DIR
}
/
NR_
IF_Module.c
${
NR_MAC_DIR
}
/main.c
${
NR_MAC_DIR
}
/config.c
)
...
...
openair1/PHY/INIT/nr_init.c
View file @
5eb919e2
...
...
@@ -57,12 +57,12 @@ int l1_north_init_gNB() {
for
(
j
=
0
;
j
<
RC
.
nb_L1_CC
[
i
];
j
++
)
{
AssertFatal
(
RC
.
gNB
[
i
][
j
]
!=
NULL
,
"RC.gNB[%d][%d] is null
\n
"
,
i
,
j
);
if
((
RC
.
gNB
[
i
][
j
]
->
if_inst
=
IF_Module_init
(
i
))
<
0
)
return
(
-
1
);
if
((
RC
.
gNB
[
i
][
j
]
->
if_inst
=
NR_
IF_Module_init
(
i
))
<
0
)
return
(
-
1
);
LOG_I
(
PHY
,
"%s() RC.gNB[%d][%d] installing callbacks
\n
"
,
__FUNCTION__
,
i
,
j
);
RC
.
gNB
[
i
][
j
]
->
if_inst
->
PHY_config_req
=
phy_config_request
;
nr_phy_config_request
(
RC
.
gNB
[
i
][
j
]
);
RC
.
gNB
[
i
][
j
]
->
if_inst
->
PHY_config_req
=
nr_
phy_config_request
;
nr_phy_config_request
(
&
RC
.
gNB
[
i
][
j
]
->
gNB_config
);
RC
.
gNB
[
i
][
j
]
->
if_inst
->
schedule_response
=
schedule_response
;
}
}
...
...
@@ -338,7 +338,8 @@ void install_schedule_handlers(IF_Module_t *if_inst)
}*/
/// this function is a temporary addition for NR configuration
void
nr_phy_config_request
(
PHY_VARS_gNB
*
gNB
)
/*void nr_phy_config_request(PHY_VARS_gNB *gNB)
{
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
nfapi_config_request_t *gNB_config = &gNB->gNB_config;
...
...
@@ -367,4 +368,63 @@ void nr_phy_config_request(PHY_VARS_gNB *gNB)
gNB->configured = 1;
LOG_I(PHY,"gNB configured\n");
}*/
void
nr_phy_config_request
(
NR_PHY_Config_t
*
phy_config
)
{
uint8_t
Mod_id
=
phy_config
->
Mod_id
;
int
CC_id
=
phy_config
->
CC_id
;
NR_DL_FRAME_PARMS
*
fp
=
&
RC
.
gNB
[
Mod_id
][
CC_id
]
->
frame_parms
;
nfapi_nr_config_request_t
*
gNB_config
=
&
RC
.
gNB
[
Mod_id
][
CC_id
]
->
gNB_config
;
gNB_config
->
nfapi_config
.
rf_bands
.
rf_band
[
0
]
=
phy_config
->
cfg
->
nfapi_config
.
rf_bands
.
rf_band
[
0
];
//22
gNB_config
->
nfapi_config
.
earfcn
.
value
=
phy_config
->
cfg
->
nfapi_config
.
earfcn
.
value
;
//6600
gNB_config
->
subframe_config
.
numerology_index_mu
.
value
=
phy_config
->
cfg
->
subframe_config
.
numerology_index_mu
.
value
;
//1
gNB_config
->
rf_config
.
tx_antenna_ports
.
value
=
phy_config
->
cfg
->
rf_config
.
tx_antenna_ports
.
value
;
//1
gNB_config
->
rf_config
.
dl_carrierBandwidth
.
value
=
phy_config
->
cfg
->
rf_config
.
dl_carrierBandwidth
.
value
;
//106;
gNB_config
->
rf_config
.
ul_carrierBandwidth
.
value
=
phy_config
->
cfg
->
rf_config
.
ul_carrierBandwidth
.
value
;
//106;
gNB_config
->
sch_config
.
half_frame_index
.
value
=
0
;
gNB_config
->
sch_config
.
ssb_subcarrier_offset
.
value
=
phy_config
->
cfg
->
sch_config
.
ssb_subcarrier_offset
.
value
;
//0;
gNB_config
->
sch_config
.
n_ssb_crb
.
value
=
86
;
gNB_config
->
sch_config
.
physical_cell_id
.
value
=
phy_config
->
cfg
->
sch_config
.
physical_cell_id
.
value
;
if
(
phy_config
->
cfg
->
subframe_config
.
duplex_mode
.
value
==
0
)
{
gNB_config
->
subframe_config
.
duplex_mode
.
value
=
TDD
;
}
else
{
gNB_config
->
subframe_config
.
duplex_mode
.
value
=
FDD
;
}
RC
.
gNB
[
Mod_id
][
CC_id
]
->
mac_enabled
=
1
;
fp
->
dl_CarrierFreq
=
from_earfcn
(
gNB_config
->
nfapi_config
.
rf_bands
.
rf_band
[
0
],
gNB_config
->
nfapi_config
.
earfcn
.
value
);
fp
->
ul_CarrierFreq
=
fp
->
dl_CarrierFreq
-
(
get_uldl_offset
(
gNB_config
->
nfapi_config
.
rf_bands
.
rf_band
[
0
])
*
100000
);
fp
->
threequarter_fs
=
0
;
LOG_I
(
PHY
,
"Configuring MIB for instance %d, CCid %d : (band %d,N_RB_DL %d, N_RB_UL %d, Nid_cell %d,gNB_tx_antenna_ports %d,DL freq %u)
\n
"
,
Mod_id
,
CC_id
,
gNB_config
->
nfapi_config
.
rf_bands
.
rf_band
[
0
],
gNB_config
->
rf_config
.
dl_carrierBandwidth
.
value
,
gNB_config
->
rf_config
.
ul_carrierBandwidth
.
value
,
gNB_config
->
sch_config
.
physical_cell_id
.
value
,
gNB_config
->
rf_config
.
tx_antenna_ports
.
value
,
fp
->
dl_CarrierFreq
);
nr_init_frame_parms
(
gNB_config
,
fp
);
if
(
RC
.
gNB
[
Mod_id
][
CC_id
]
->
configured
==
1
){
LOG_E
(
PHY
,
"Already gNB already configured, do nothing
\n
"
);
return
;
}
RC
.
gNB
[
Mod_id
][
CC_id
]
->
configured
=
1
;
LOG_I
(
PHY
,
"gNB %d/%d configured
\n
"
,
Mod_id
,
CC_id
);
}
openair1/PHY/INIT/phy_init.h
View file @
5eb919e2
...
...
@@ -378,7 +378,7 @@ int nr_init_frame_parms(nfapi_config_request_t* config, NR_DL_FRAME_PARMS *frame
int
nr_init_frame_parms_ue
(
nfapi_config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
);
void
nr_dump_frame_parms
(
NR_DL_FRAME_PARMS
*
frame_parms
);
int
phy_init_nr_gNB
(
PHY_VARS_gNB
*
gNB
,
unsigned
char
is_secondary_gNB
,
unsigned
char
abstraction_flag
);
void
nr_phy_config_request
(
PHY_VARS_gNB
*
gNB
);
void
nr_phy_config_request
(
NR_PHY_Config_t
*
gNB
);
void
phy_free_nr_gNB
(
PHY_VARS_gNB
*
gNB
);
/** @} */
...
...
openair1/PHY/defs_NR.h
View file @
5eb919e2
...
...
@@ -114,7 +114,7 @@ typedef struct PHY_VARS_gNB_s {
int
(
*
te
)(
struct
PHY_VARS_gNB_s
*
,
uint8_t
*
,
uint8_t
,
LTE_eNB_DLSCH_t
*
,
int
,
uint8_t
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
);
int
(
*
start_if
)(
struct
RU_t_s
*
ru
,
struct
PHY_VARS_gNB_s
*
eNB
);
uint8_t
local_flag
;
nfapi_config_request_t
gNB_config
;
nfapi_
nr_
config_request_t
gNB_config
;
NR_DL_FRAME_PARMS
frame_parms
;
PHY_MEASUREMENTS_gNB
measurements
;
IF_Module_t
*
if_inst
;
...
...
openair1/PHY/defs_gNB.h
View file @
5eb919e2
...
...
@@ -35,7 +35,7 @@
#include "defs_eNB.h"
#include "defs_nr_common.h"
#include "CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
typedef
struct
{
uint8_t
pbch_a
[
NR_POLAR_PBCH_PAYLOAD_BITS
];
...
...
openair2/LAYER2/NR_MAC_gNB/mac.h
View file @
5eb919e2
...
...
@@ -48,7 +48,7 @@
#include "nfapi_nr_interface.h"
#include "NR_PHY_INTERFACE/IF_Module.h"
#include "NR_PHY_INTERFACE/
NR_
IF_Module.h"
#include "PHY/TOOLS/time_meas.h"
...
...
openair2/NR_PHY_INTERFACE/IF_Module.c
→
openair2/NR_PHY_INTERFACE/
NR_
IF_Module.c
View file @
5eb919e2
#include "openair1/PHY/defs_eNB.h"
#include "openair2/NR_PHY_INTERFACE/IF_Module.h"
#include "openair2/NR_PHY_INTERFACE/
NR_
IF_Module.h"
#include "openair1/PHY/phy_extern.h"
#include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
...
...
openair2/NR_PHY_INTERFACE/IF_Module.h
→
openair2/NR_PHY_INTERFACE/
NR_
IF_Module.h
View file @
5eb919e2
File moved
targets/RT/USER/nr-ru.c
View file @
5eb919e2
...
...
@@ -132,7 +132,7 @@ extern volatile int oai_exit;
extern
void
nr_phy_init_RU
(
RU_t
*
);
extern
void
nr_phy_free_RU
(
RU_t
*
);
extern
void
nr_phy_config_request
(
PHY_VARS_gNB
*
gNB
);
extern
void
nr_phy_config_request
(
NR_PHY_Config_t
*
gNB
);
void
init_RU
(
char
*
);
void
stop_RU
(
int
nb_ru
);
...
...
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