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
常顺宇
OpenXG-RAN
Commits
a98bf76d
Commit
a98bf76d
authored
Jun 22, 2018
by
WEI-TAI CHEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-Solving some of warning
"implicit declaration of function" "incompatible pointer type'
parent
5eb919e2
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
286 additions
and
65 deletions
+286
-65
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+3
-1
openair1/PHY/INIT/nr_parms.c
openair1/PHY/INIT/nr_parms.c
+3
-3
openair1/PHY/INIT/phy_init.h
openair1/PHY/INIT/phy_init.h
+2
-1
openair1/PHY/NR_REFSIG/nr_gold.c
openair1/PHY/NR_REFSIG/nr_gold.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+2
-2
openair1/PHY/NR_TRANSPORT/nr_pss.c
openair1/PHY/NR_TRANSPORT/nr_pss.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_sss.c
openair1/PHY/NR_TRANSPORT/nr_sss.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_transport.h
openair1/PHY/NR_TRANSPORT/nr_transport.h
+4
-4
openair1/PHY/defs_NR.h
openair1/PHY/defs_NR.h
+1
-1
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+2
-2
openair1/SCHED_NR/defs.h
openair1/SCHED_NR/defs.h
+0
-1
openair1/SCHED_NR/phy_procedures_nr_common.c
openair1/SCHED_NR/phy_procedures_nr_common.c
+1
-1
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+3
-3
openair2/GNB_APP/gnb_app.c
openair2/GNB_APP/gnb_app.c
+2
-0
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+35
-34
openair2/LAYER2/MAC/mac.h
openair2/LAYER2/MAC/mac.h
+5
-0
openair2/LAYER2/MAC/mac_proto.h
openair2/LAYER2/MAC/mac_proto.h
+1
-0
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+213
-5
openair2/RRC/LTE/rrc_eNB.c
openair2/RRC/LTE/rrc_eNB.c
+2
-0
openair2/UTIL/LOG/log.h
openair2/UTIL/LOG/log.h
+1
-1
targets/RT/USER/nr-gnb.c
targets/RT/USER/nr-gnb.c
+2
-2
targets/RT/USER/nr-softmodem.c
targets/RT/USER/nr-softmodem.c
+1
-1
No files found.
openair1/PHY/INIT/nr_init.c
View file @
a98bf76d
...
...
@@ -33,6 +33,9 @@
#include "assertions.h"
#include <math.h>
#include "PHY/NR_REFSIG/defs.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
extern
uint32_t
from_earfcn
(
int
eutra_bandP
,
uint32_t
dl_earfcn
);
extern
int32_t
get_uldl_offset
(
int
eutra_bandP
);
...
...
@@ -62,7 +65,6 @@ 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
;
nr_phy_config_request
(
&
RC
.
gNB
[
i
][
j
]
->
gNB_config
);
RC
.
gNB
[
i
][
j
]
->
if_inst
->
schedule_response
=
schedule_response
;
}
}
...
...
openair1/PHY/INIT/nr_parms.c
View file @
a98bf76d
...
...
@@ -26,12 +26,12 @@
uint32_t
nr_subcarrier_spacing
[
MAX_NUM_SUBCARRIER_SPACING
]
=
{
15e3
,
30e3
,
60e3
,
120e3
,
240e3
};
uint16_t
nr_slots_per_subframe
[
MAX_NUM_SUBCARRIER_SPACING
]
=
{
1
,
2
,
4
,
16
,
32
};
int
nr_init_frame_parms
(
nfapi_config_request_t
*
config
,
int
nr_init_frame_parms
(
nfapi_
nr_
config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
int
N_RB
=
config
->
rf_config
.
dl_c
hannel_b
andwidth
.
value
;
int
Ncp
=
config
->
subframe_config
.
dl_
cyclic_
prefix_type
.
value
;
int
N_RB
=
config
->
rf_config
.
dl_c
arrierB
andwidth
.
value
;
int
Ncp
=
config
->
subframe_config
.
dl_prefix_type
.
value
;
int
mu
=
config
->
subframe_config
.
numerology_index_mu
.
value
;
#if DISABLE_LOG_X
...
...
openair1/PHY/INIT/phy_init.h
View file @
a98bf76d
...
...
@@ -374,12 +374,13 @@ void phy_config_request(PHY_Config_t *phy_config);
int
init_frame_parms
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
osf
);
void
dump_frame_parms
(
LTE_DL_FRAME_PARMS
*
frame_parms
);
int
nr_init_frame_parms
(
nfapi_config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
);
int
nr_init_frame_parms
(
nfapi_
nr_
config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
);
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
(
NR_PHY_Config_t
*
gNB
);
void
phy_free_nr_gNB
(
PHY_VARS_gNB
*
gNB
);
int
l1_north_init_gNB
(
void
);
/** @} */
#endif
...
...
openair1/PHY/NR_REFSIG/nr_gold.c
View file @
a98bf76d
...
...
@@ -27,7 +27,7 @@ void nr_init_pbch_dmrs(PHY_VARS_gNB* gNB)
unsigned
int
n
,
x1
,
x2
;
unsigned
char
Nid
,
i_ssb
,
i_ssb2
;
unsigned
char
Lmax
,
l
,
n_hf
,
N_hf
;
nfapi_config_request_t
*
cfg
=
&
gNB
->
gNB_config
;
nfapi_
nr_
config_request_t
*
cfg
=
&
gNB
->
gNB_config
;
NR_DL_FRAME_PARMS
*
fp
=
&
gNB
->
frame_parms
;
Nid
=
cfg
->
sch_config
.
physical_cell_id
.
value
;
...
...
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
a98bf76d
...
...
@@ -46,7 +46,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
int16_t
amp
,
uint8_t
ssb_start_symbol
,
uint8_t
nushift
,
nfapi_config_request_t
*
config
,
nfapi_
nr_
config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
int
k
,
l
;
...
...
@@ -159,7 +159,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
uint8_t
n_hf
,
int
sfn
,
int
frame_mod8
,
nfapi_config_request_t
*
config
,
nfapi_
nr_
config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
...
...
openair1/PHY/NR_TRANSPORT/nr_pss.c
View file @
a98bf76d
...
...
@@ -28,7 +28,7 @@ int nr_generate_pss( int16_t *d_pss,
int32_t
**
txdataF
,
int16_t
amp
,
uint8_t
ssb_start_symbol
,
nfapi_config_request_t
*
config
,
nfapi_
nr_
config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
int
i
,
k
,
l
,
m
;
...
...
openair1/PHY/NR_TRANSPORT/nr_sss.c
View file @
a98bf76d
...
...
@@ -27,7 +27,7 @@ int nr_generate_sss( int16_t *d_sss,
int32_t
**
txdataF
,
int16_t
amp
,
uint8_t
ssb_start_symbol
,
nfapi_config_request_t
*
config
,
nfapi_
nr_
config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
int
i
,
k
,
l
;
...
...
openair1/PHY/NR_TRANSPORT/nr_transport.h
View file @
a98bf76d
...
...
@@ -36,7 +36,7 @@ int nr_generate_pss( int16_t *d_pss,
int32_t
**
txdataF
,
int16_t
amp
,
uint8_t
ssb_start_symbol
,
nfapi_config_request_t
*
config
,
nfapi_
nr_
config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
);
/*!
...
...
@@ -49,7 +49,7 @@ int nr_generate_sss( int16_t *d_sss,
int32_t
**
txdataF
,
int16_t
amp
,
uint8_t
ssb_start_symbol
,
nfapi_config_request_t
*
config
,
nfapi_
nr_
config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
);
/*!
...
...
@@ -63,7 +63,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
int16_t
amp
,
uint8_t
ssb_start_symbol
,
uint8_t
nushift
,
nfapi_config_request_t
*
config
,
nfapi_
nr_
config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
);
/*!
...
...
@@ -91,7 +91,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
uint8_t
n_hf
,
int
sfn
,
int
frame_mod8
,
nfapi_config_request_t
*
config
,
nfapi_
nr_
config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
);
#endif
/*__NR_TRANSPORT__H__*/
openair1/PHY/defs_NR.h
View file @
a98bf76d
...
...
@@ -117,7 +117,7 @@ typedef struct PHY_VARS_gNB_s {
nfapi_nr_config_request_t
gNB_config
;
NR_DL_FRAME_PARMS
frame_parms
;
PHY_MEASUREMENTS_gNB
measurements
;
IF_Module_t
*
if_inst
;
NR_
IF_Module_t
*
if_inst
;
UL_IND_t
UL_INFO
;
pthread_mutex_t
UL_INFO_mutex
;
/// NFAPI RX ULSCH information
...
...
openair1/PHY/defs_gNB.h
View file @
a98bf76d
...
...
@@ -240,10 +240,10 @@ typedef struct PHY_VARS_gNB_s {
int
rx_total_gain_dB
;
int
(
*
start_if
)(
struct
RU_t_s
*
ru
,
struct
PHY_VARS_gNB_s
*
gNB
);
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
;
NR_
IF_Module_t
*
if_inst
;
UL_IND_t
UL_INFO
;
pthread_mutex_t
UL_INFO_mutex
;
/// NFAPI RX ULSCH information
...
...
openair1/SCHED_NR/defs.h
View file @
a98bf76d
...
...
@@ -32,7 +32,6 @@
#include "PHY_INTERFACE/phy_interface.h"
#include "SCHED/sched_eNB.h"
lte_subframe_t
nr_subframe_select
(
nfapi_config_request_t
*
cfg
,
unsigned
char
subframe
);
int
nr_generate_pss
(
int16_t
*
d_pss
,
int32_t
**
txdataF
,
int16_t
amp
,
...
...
openair1/SCHED_NR/phy_procedures_nr_common.c
View file @
a98bf76d
...
...
@@ -34,7 +34,7 @@
#include "SCHED_NR/defs.h"
nr_subframe_t
nr_subframe_select
(
nfapi_config_request_t
*
cfg
,
unsigned
char
subframe
)
nr_subframe_t
nr_subframe_select
(
nfapi_
nr_
config_request_t
*
cfg
,
unsigned
char
subframe
)
{
if
(
cfg
->
subframe_config
.
duplex_mode
.
value
==
FDD
)
return
(
SF_DL
);
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
a98bf76d
...
...
@@ -75,7 +75,7 @@ int return_ssb_type(nfapi_config_request_t *cfg)
}*/
// First SSB starting symbol candidate is used and type B is chosen for 30kHz SCS
int
nr_get_ssb_start_symbol
(
nfapi_config_request_t
*
cfg
,
NR_DL_FRAME_PARMS
*
fp
)
int
nr_get_ssb_start_symbol
(
nfapi_
nr_
config_request_t
*
cfg
,
NR_DL_FRAME_PARMS
*
fp
)
{
int
mu
=
cfg
->
subframe_config
.
numerology_index_mu
.
value
;
int
symbol
=
0
;
...
...
@@ -118,7 +118,7 @@ void nr_set_ssb_first_subcarrier(nfapi_config_request_t *cfg, NR_DL_FRAME_PARMS
void
nr_common_signal_procedures
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
subframe
)
{
NR_DL_FRAME_PARMS
*
fp
=&
gNB
->
frame_parms
;
nfapi_config_request_t
*
cfg
=
&
gNB
->
gNB_config
;
nfapi_
nr_
config_request_t
*
cfg
=
&
gNB
->
gNB_config
;
int
**
txdataF
=
gNB
->
common_vars
.
txdataF
;
uint8_t
*
pbch_pdu
=&
gNB
->
pbch_pdu
[
0
];
int
ss_subframe
=
(
cfg
->
sch_config
.
half_frame_index
.
value
)
?
5
:
0
;
...
...
@@ -161,7 +161,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
int
subframe
=
proc
->
subframe_tx
;
NR_DL_FRAME_PARMS
*
fp
=&
gNB
->
frame_parms
;
nfapi_config_request_t
*
cfg
=
&
gNB
->
gNB_config
;
nfapi_
nr_
config_request_t
*
cfg
=
&
gNB
->
gNB_config
;
int
offset
=
gNB
->
CC_id
;
...
...
openair2/GNB_APP/gnb_app.c
View file @
a98bf76d
...
...
@@ -46,6 +46,8 @@
# include "gtpv1u_eNB_task.h"
# endif
# include "PHY/INIT/phy_init.h"
extern
unsigned
char
NB_gNB_INST
;
#endif
...
...
openair2/GNB_APP/gnb_config.c
View file @
a98bf76d
...
...
@@ -58,6 +58,7 @@
#include "common/config/config_userapi.h"
#include "RRC_config_tools.h"
#include "gnb_paramdef.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
extern
uint16_t
sf_ahead
;
...
...
@@ -77,23 +78,23 @@ void RCconfig_NR_flexran()
* the only reason for all these variables is, that they are "hard-encoded"
* into the CCPARAMS_DESC macro and we need it for the Nid_cell variable ...
*/
char
*
frame_type
,
DL_prefix_type
,
UL_prefix_type
,
SIB1_frequencyOffsetSSB
,
DL_SCS_SubcarrierSpacing
,
DL_BWP_SubcarrierSpacing
,
DL_BWP_prefix_type
,
UL_frequencyShift7p5khz
,
UL_SCS_SubcarrierSpacing
,
UL_BWP_SubcarrierSpacing
,
UL_BWP_prefix_type
,
ServingCellConfigCommon_ssb_PositionsInBurst_PR
,
NIA_SubcarrierSpacing
,
referenceSubcarrierSpacing
,
dl_UL_TransmissionPeriodicity
,
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice
,
rach_groupBconfigured
,
rach_messagePowerOffsetGroupB
,
prach_RootSequenceIndex_choice
,
prach_msg1_SubcarrierSpacing
,
restrictedSetConfig
,
msg3_transformPrecoding
,
prach_msg1_FDM
,
powerRampingStep
,
groupHoppingEnabledTransformPrecoding
,
PUSCH_TimeDomainResourceAllocation_mappingType
,
pucch_GroupHopping
,
PDSCH_TimeDomainResourceAllocation_mappingType
,
RateMatchPattern_patternType
,
symbolsInResourceBlock
,
RateMatchPattern_subcarrierSpacing
,
RateMatchPattern_mode
,
PDCCH_cce_REG_MappingType
,
PDCCH_precoderGranularity
,
tci_PresentInDCI
,
SearchSpace_monitoringSlotPeriodicityAndOffset_choice
,
SearchSpace_searchSpaceType
,
ue_Specific__dci_Formats
,
RateMatchPatternLTE_CRS_subframeAllocation_choice
;
char
*
frame_type
,
*
DL_prefix_type
,
*
UL_prefix_type
,
*
SIB1_frequencyOffsetSSB
,
*
DL_SCS_SubcarrierSpacing
,
*
DL_BWP_SubcarrierSpacing
,
*
DL_BWP_prefix_type
,
*
UL_frequencyShift7p5khz
,
*
UL_SCS_SubcarrierSpacing
,
*
UL_BWP_SubcarrierSpacing
,
*
UL_BWP_prefix_type
,
*
ServingCellConfigCommon_ssb_PositionsInBurst_PR
,
*
NIA_SubcarrierSpacing
,
*
referenceSubcarrierSpacing
,
*
dl_UL_TransmissionPeriodicity
,
*
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice
,
*
rach_groupBconfigured
,
*
rach_messagePowerOffsetGroupB
,
*
prach_RootSequenceIndex_choice
,
*
prach_msg1_SubcarrierSpacing
,
*
restrictedSetConfig
,
*
msg3_transformPrecoding
,
*
prach_msg1_FDM
,
*
powerRampingStep
,
*
groupHoppingEnabledTransformPrecoding
,
*
PUSCH_TimeDomainResourceAllocation_mappingType
,
*
pucch_GroupHopping
,
*
PDSCH_TimeDomainResourceAllocation_mappingType
,
*
RateMatchPattern_patternType
,
*
symbolsInResourceBlock
,
*
RateMatchPattern_subcarrierSpacing
,
*
RateMatchPattern_mode
,
*
PDCCH_cce_REG_MappingType
,
*
PDCCH_precoderGranularity
,
*
tci_PresentInDCI
,
*
SearchSpace_monitoringSlotPeriodicityAndOffset_choice
,
*
SearchSpace_searchSpaceType
,
*
ue_Specific__dci_Formats
,
*
RateMatchPatternLTE_CRS_subframeAllocation_choice
;
long
long
int
downlink_frequency
;
...
...
@@ -840,7 +841,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
SIB1_frequencyOffsetSSB
,
"khz5"
)
==
0
)
{
NRRRC_CONFIGURATION_REQ
(
msg_p
).
SIB1_frequencyOffsetSSB
[
j
]
=
5
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for SIB1_frequencyOffsetSSB !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for SIB1_frequencyOffsetSSB !
\n
"
,
RC
.
config_file_name
,
i
,
SIB1_frequencyOffsetSSB
);
}
...
...
@@ -1646,7 +1647,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
NRRRC_CONFIGURATION_REQ
(
msg_p
).
prach_RootSequenceIndex_choice
[
j
]
=
NR_RACH_ConfigCommon__prach_RootSequenceIndex_PR_l139
;
NRRRC_CONFIGURATION_REQ
(
msg_p
).
prach_RootSequenceIndex_l139
[
j
]
=
prach_RootSequenceIndex_l139
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for prach_RootSequenceIndex_choice !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for prach_RootSequenceIndex_choice !
\n
"
,
RC
.
config_file_name
,
i
,
prach_RootSequenceIndex_choice
);
}
...
...
@@ -1672,7 +1673,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
restrictedSetConfig
,
"restrictedSetTypeB"
)
==
0
)
{
NRRRC_CONFIGURATION_REQ
(
msg_p
).
restrictedSetConfig
[
j
]
=
NR_RACH_ConfigCommon__restrictedSetConfig_restrictedSetTypeB
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for restrictedSetConfig !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for restrictedSetConfig !
\n
"
,
RC
.
config_file_name
,
i
,
restrictedSetConfig
);
}
...
...
@@ -1696,7 +1697,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
prach_msg1_FDM
,
"eight"
)
==
0
)
{
NRRRC_CONFIGURATION_REQ
(
msg_p
).
prach_msg1_FDM
[
j
]
=
NR_RACH_ConfigGeneric__msg1_FDM_eight
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for prach_msg1_FDM !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for prach_msg1_FDM !
\n
"
,
RC
.
config_file_name
,
i
,
prach_msg1_FDM
);
}
...
...
@@ -1767,7 +1768,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
powerRampingStep
,
"dB6"
)
==
0
)
{
NRRRC_CONFIGURATION_REQ
(
msg_p
).
powerRampingStep
[
j
]
=
NR_RACH_ConfigGeneric__powerRampingStep_dB6
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for powerRampingStep !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for powerRampingStep !
\n
"
,
RC
.
config_file_name
,
i
,
powerRampingStep
);
}
...
...
@@ -1831,7 +1832,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
PUSCH_TimeDomainResourceAllocation_mappingType
,
"typeB"
)
==
0
){
NRRRC_CONFIGURATION_REQ
(
msg_p
).
PUSCH_TimeDomainResourceAllocation_mappingType
[
j
]
=
NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for PUSCH_TimeDomainResourceAllocation_mappingType !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for PUSCH_TimeDomainResourceAllocation_mappingType !
\n
"
,
RC
.
config_file_name
,
i
,
PUSCH_TimeDomainResourceAllocation_mappingType
);
}
...
...
@@ -1843,7 +1844,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
pucch_GroupHopping
,
"disable"
)
==
0
){
NRRRC_CONFIGURATION_REQ
(
msg_p
).
pucch_GroupHopping
[
j
]
=
NR_PUCCH_ConfigCommon__pucch_GroupHopping_disable
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for pucch_GroupHopping !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for pucch_GroupHopping !
\n
"
,
RC
.
config_file_name
,
i
,
pucch_GroupHopping
);
}
...
...
@@ -1865,7 +1866,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
PDSCH_TimeDomainResourceAllocation_mappingType
,
"typeB"
)
==
0
){
NRRRC_CONFIGURATION_REQ
(
msg_p
).
PDSCH_TimeDomainResourceAllocation_mappingType
[
j
]
=
NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeB
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for PDSCH_TimeDomainResourceAllocation_mappingType !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for PDSCH_TimeDomainResourceAllocation_mappingType !
\n
"
,
RC
.
config_file_name
,
i
,
PDSCH_TimeDomainResourceAllocation_mappingType
);
}
...
...
@@ -1883,7 +1884,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
RateMatchPattern_patternType
,
"controlResourceSet"
)
==
0
){
NRRRC_CONFIGURATION_REQ
(
msg_p
).
RateMatchPattern_patternType
[
j
]
=
NR_RateMatchPattern__patternType_PR_controlResourceSet
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for RateMatchPattern_patternType !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for RateMatchPattern_patternType !
\n
"
,
RC
.
config_file_name
,
i
,
RateMatchPattern_patternType
);
}
...
...
@@ -1894,7 +1895,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
symbolsInResourceBlock
,
"twoSlots"
)
==
0
){
NRRRC_CONFIGURATION_REQ
(
msg_p
).
symbolsInResourceBlock
[
j
]
=
NR_RateMatchPattern__patternType__bitmaps__symbolsInResourceBlock_PR_twoSlots
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for symbolsInResourceBlock !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for symbolsInResourceBlock !
\n
"
,
RC
.
config_file_name
,
i
,
symbolsInResourceBlock
);
}
...
...
@@ -1952,7 +1953,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
RateMatchPattern_mode
,
"semiStatic"
)
==
0
){
NRRRC_CONFIGURATION_REQ
(
msg_p
).
RateMatchPattern_mode
[
j
]
=
NR_RateMatchPattern__mode_semiStatic
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for RateMatchPattern_mode !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for RateMatchPattern_mode !
\n
"
,
RC
.
config_file_name
,
i
,
RateMatchPattern_mode
);
}
...
...
@@ -2007,7 +2008,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
PDCCH_cce_REG_MappingType
,
"nonInterleaved"
)
==
0
){
NRRRC_CONFIGURATION_REQ
(
msg_p
).
PDCCH_cce_REG_MappingType
[
j
]
=
NR_ControlResourceSet__cce_REG_MappingType_PR_nonInterleaved
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for PDCCH_cce_REG_MappingType !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for PDCCH_cce_REG_MappingType !
\n
"
,
RC
.
config_file_name
,
i
,
PDCCH_cce_REG_MappingType
);
}
...
...
@@ -2054,7 +2055,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
PDCCH_precoderGranularity
,
"allContiguousRBs"
)
==
0
){
NRRRC_CONFIGURATION_REQ
(
msg_p
).
PDCCH_precoderGranularity
[
j
]
=
NR_ControlResourceSet__precoderGranularity_allContiguousRBs
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for PDCCH_precoderGranularity !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for PDCCH_precoderGranularity !
\n
"
,
RC
.
config_file_name
,
i
,
PDCCH_precoderGranularity
);
}
...
...
@@ -2153,7 +2154,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
NRRRC_CONFIGURATION_REQ
(
msg_p
).
SearchSpace_monitoringSlotPeriodicityAndOffset_choice
[
j
]
=
NR_SearchSpace__monitoringSlotPeriodicityAndOffset_PR_NOTHING
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for SearchSpace_monitoringSlotPeriodicityAndOffset_choice !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for SearchSpace_monitoringSlotPeriodicityAndOffset_choice !
\n
"
,
RC
.
config_file_name
,
i
,
SearchSpace_monitoringSlotPeriodicityAndOffset_choice
);
}
// End if (strcmp(SearchSpace_monitoringSlotPeriodicityAndOffset_choice , "sl1")
...
...
@@ -2320,7 +2321,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
SearchSpace_searchSpaceType
,
"ue_Specific"
)
==
0
){
NRRRC_CONFIGURATION_REQ
(
msg_p
).
SearchSpace_searchSpaceType
[
j
]
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for SearchSpace_searchSpaceType !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for SearchSpace_searchSpaceType !
\n
"
,
RC
.
config_file_name
,
i
,
SearchSpace_searchSpaceType
);
}
...
...
@@ -2438,7 +2439,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
ue_Specific__dci_Formats
,
"formats0-1-And-1-1"
)
==
0
){
NRRRC_CONFIGURATION_REQ
(
msg_p
).
ue_Specific__dci_Formats
[
j
]
=
NR_SearchSpace__searchSpaceType__ue_Specific__dci_Formats_formats0_1_And_1_1
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for ue_Specific__dci_Formats !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for ue_Specific__dci_Formats !
\n
"
,
RC
.
config_file_name
,
i
,
ue_Specific__dci_Formats
);
}
...
...
@@ -2553,7 +2554,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
}
else
if
(
strcmp
(
RateMatchPatternLTE_CRS_subframeAllocation_choice
,
"fourFrames"
)
==
0
){
NRRRC_CONFIGURATION_REQ
(
msg_p
).
RateMatchPatternLTE_CRS_subframeAllocation_choice
[
j
]
=
NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames
;
}
else
{
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
d
\"
for RateMatchPatternLTE_CRS_subframeAllocation_choice !
\n
"
,
AssertFatal
(
0
,
"Failed to parse gNB configuration file %s, gnb %d unknown value
\"
%
s
\"
for RateMatchPatternLTE_CRS_subframeAllocation_choice !
\n
"
,
RC
.
config_file_name
,
i
,
RateMatchPatternLTE_CRS_subframeAllocation_choice
);
}
...
...
openair2/LAYER2/MAC/mac.h
View file @
a98bf76d
...
...
@@ -73,6 +73,11 @@
#include "targets/ARCH/COMMON/common_lib.h"
//solve implicit declaration
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
/** @defgroup _mac MAC
* @ingroup _oai2
* @{
...
...
openair2/LAYER2/MAC/mac_proto.h
View file @
a98bf76d
...
...
@@ -32,6 +32,7 @@
#include "LAYER2/MAC/mac.h"
#include "PHY/defs_common.h" // for PRACH_RESOURCES_t and lte_subframe_t
/** \addtogroup _mac
* @{
*/
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
a98bf76d
...
...
@@ -18,6 +18,214 @@ extern int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind);
extern
uint8_t
nfapi_mode
;
extern
uint16_t
sf_ahead
;
void
handle_nr_rach
(
NR_UL_IND_t
*
UL_info
)
{
int
i
;
if
(
UL_info
->
rach_ind
.
rach_indication_body
.
number_of_preambles
>
0
)
{
AssertFatal
(
UL_info
->
rach_ind
.
rach_indication_body
.
number_of_preambles
==
1
,
"More than 1 preamble not supported
\n
"
);
UL_info
->
rach_ind
.
rach_indication_body
.
number_of_preambles
=
0
;
LOG_D
(
MAC
,
"UL_info[Frame %d, Subframe %d] Calling initiate_ra_proc RACH:SFN/SF:%d
\n
"
,
UL_info
->
frame
,
UL_info
->
subframe
,
NFAPI_SFNSF2DEC
(
UL_info
->
rach_ind
.
sfn_sf
));
initiate_ra_proc
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
NFAPI_SFNSF2SFN
(
UL_info
->
rach_ind
.
sfn_sf
),
NFAPI_SFNSF2SF
(
UL_info
->
rach_ind
.
sfn_sf
),
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
preamble
,
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
timing_advance
,
UL_info
->
rach_ind
.
rach_indication_body
.
preamble_list
[
0
].
preamble_rel8
.
rnti
#ifdef Rel14
,
0
#endif
);
}
#ifdef Rel14
if
(
UL_info
->
rach_ind_br
.
rach_indication_body
.
number_of_preambles
>
0
)
{
AssertFatal
(
UL_info
->
rach_ind_br
.
rach_indication_body
.
number_of_preambles
<
5
,
"More than 4 preambles not supported
\n
"
);
for
(
i
=
0
;
i
<
UL_info
->
rach_ind_br
.
rach_indication_body
.
number_of_preambles
;
i
++
)
{
AssertFatal
(
UL_info
->
rach_ind_br
.
rach_indication_body
.
preamble_list
[
i
].
preamble_rel13
.
rach_resource_type
>
0
,
"Got regular PRACH preamble, not BL/CE
\n
"
);
LOG_D
(
MAC
,
"Frame %d, Subframe %d Calling initiate_ra_proc (CE_level %d)
\n
"
,
UL_info
->
frame
,
UL_info
->
subframe
,
UL_info
->
rach_ind_br
.
rach_indication_body
.
preamble_list
[
i
].
preamble_rel13
.
rach_resource_type
-
1
);
initiate_ra_proc
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
,
UL_info
->
rach_ind_br
.
rach_indication_body
.
preamble_list
[
i
].
preamble_rel8
.
preamble
,
UL_info
->
rach_ind_br
.
rach_indication_body
.
preamble_list
[
i
].
preamble_rel8
.
timing_advance
,
UL_info
->
rach_ind_br
.
rach_indication_body
.
preamble_list
[
i
].
preamble_rel8
.
rnti
,
UL_info
->
rach_ind_br
.
rach_indication_body
.
preamble_list
[
i
].
preamble_rel13
.
rach_resource_type
);
}
UL_info
->
rach_ind_br
.
rach_indication_body
.
number_of_preambles
=
0
;
}
#endif
}
void
handle_nr_sr
(
NR_UL_IND_t
*
UL_info
)
{
int
i
;
if
(
nfapi_mode
==
1
)
// PNF
{
if
(
UL_info
->
sr_ind
.
sr_indication_body
.
number_of_srs
>
0
)
{
oai_nfapi_sr_indication
(
&
UL_info
->
sr_ind
);
}
}
else
{
for
(
i
=
0
;
i
<
UL_info
->
sr_ind
.
sr_indication_body
.
number_of_srs
;
i
++
)
SR_indication
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
,
UL_info
->
sr_ind
.
sr_indication_body
.
sr_pdu_list
[
i
].
rx_ue_information
.
rnti
,
UL_info
->
sr_ind
.
sr_indication_body
.
sr_pdu_list
[
i
].
ul_cqi_information
.
ul_cqi
);
}
UL_info
->
sr_ind
.
sr_indication_body
.
number_of_srs
=
0
;
}
void
handle_nr_cqi
(
NR_UL_IND_t
*
UL_info
)
{
int
i
;
if
(
nfapi_mode
==
1
)
{
if
(
UL_info
->
cqi_ind
.
number_of_cqis
>
0
)
{
LOG_D
(
PHY
,
"UL_info->cqi_ind.number_of_cqis:%d
\n
"
,
UL_info
->
cqi_ind
.
number_of_cqis
);
nfapi_cqi_indication_t
ind
;
ind
.
header
.
message_id
=
NFAPI_RX_CQI_INDICATION
;
ind
.
sfn_sf
=
UL_info
->
frame
<<
4
|
UL_info
->
subframe
;
ind
.
cqi_indication_body
=
UL_info
->
cqi_ind
;
oai_nfapi_cqi_indication
(
&
ind
);
UL_info
->
cqi_ind
.
number_of_cqis
=
0
;
}
}
else
{
for
(
i
=
0
;
i
<
UL_info
->
cqi_ind
.
number_of_cqis
;
i
++
)
cqi_indication
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
,
UL_info
->
cqi_ind
.
cqi_pdu_list
[
i
].
rx_ue_information
.
rnti
,
&
UL_info
->
cqi_ind
.
cqi_pdu_list
[
i
].
cqi_indication_rel9
,
UL_info
->
cqi_ind
.
cqi_raw_pdu_list
[
i
].
pdu
,
&
UL_info
->
cqi_ind
.
cqi_pdu_list
[
i
].
ul_cqi_information
);
UL_info
->
cqi_ind
.
number_of_cqis
=
0
;
}
}
void
handle_nr_harq
(
NR_UL_IND_t
*
UL_info
)
{
int
i
;
if
(
nfapi_mode
==
1
&&
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
>
0
)
// PNF
{
//LOG_D(PHY, "UL_info->harq_ind.harq_indication_body.number_of_harqs:%d Send to VNF\n", UL_info->harq_ind.harq_indication_body.number_of_harqs);
int
retval
=
oai_nfapi_harq_indication
(
&
UL_info
->
harq_ind
);
if
(
retval
!=
0
)
{
LOG_E
(
PHY
,
"Failed to encode NFAPI HARQ_IND retval:%d
\n
"
,
retval
);
}
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
=
0
;
}
else
{
for
(
i
=
0
;
i
<
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
;
i
++
)
harq_indication
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
NFAPI_SFNSF2SFN
(
UL_info
->
harq_ind
.
sfn_sf
),
NFAPI_SFNSF2SF
(
UL_info
->
harq_ind
.
sfn_sf
),
&
UL_info
->
harq_ind
.
harq_indication_body
.
harq_pdu_list
[
i
]);
UL_info
->
harq_ind
.
harq_indication_body
.
number_of_harqs
=
0
;
}
}
void
handle_nr_ulsch
(
NR_UL_IND_t
*
UL_info
)
{
int
i
,
j
;
if
(
nfapi_mode
==
1
)
{
if
(
UL_info
->
crc_ind
.
crc_indication_body
.
number_of_crcs
>
0
)
{
//LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf));
oai_nfapi_crc_indication
(
&
UL_info
->
crc_ind
);
UL_info
->
crc_ind
.
crc_indication_body
.
number_of_crcs
=
0
;
}
if
(
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
>
0
)
{
//LOG_D(PHY,"UL_info->rx_ind.number_of_pdus:%d RX_IND:SFN/SF:%d\n", UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf));
oai_nfapi_rx_ind
(
&
UL_info
->
rx_ind
);
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
=
0
;
}
}
else
{
if
(
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
>
0
&&
UL_info
->
crc_ind
.
crc_indication_body
.
number_of_crcs
>
0
)
{
for
(
i
=
0
;
i
<
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
;
i
++
)
{
for
(
j
=
0
;
j
<
UL_info
->
crc_ind
.
crc_indication_body
.
number_of_crcs
;
j
++
)
{
// find crc_indication j corresponding rx_indication i
LOG_D
(
PHY
,
"UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].rx_ue_information.rnti:%04x UL_info->rx_ind.rx_indication_body.rx_pdu_list[%d].rx_ue_information.rnti:%04x
\n
"
,
j
,
UL_info
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
[
j
].
rx_ue_information
.
rnti
,
i
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_ue_information
.
rnti
);
if
(
UL_info
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
[
j
].
rx_ue_information
.
rnti
==
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_ue_information
.
rnti
)
{
LOG_D
(
PHY
,
"UL_info->crc_ind.crc_indication_body.crc_pdu_list[%d].crc_indication_rel8.crc_flag:%d
\n
"
,
j
,
UL_info
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
[
j
].
crc_indication_rel8
.
crc_flag
);
if
(
UL_info
->
crc_ind
.
crc_indication_body
.
crc_pdu_list
[
j
].
crc_indication_rel8
.
crc_flag
==
1
)
{
// CRC error indication
LOG_D
(
MAC
,
"Frame %d, Subframe %d Calling rx_sdu (CRC error)
\n
"
,
UL_info
->
frame
,
UL_info
->
subframe
);
rx_sdu
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
NFAPI_SFNSF2SFN
(
UL_info
->
rx_ind
.
sfn_sf
),
//UL_info->frame,
NFAPI_SFNSF2SF
(
UL_info
->
rx_ind
.
sfn_sf
),
//UL_info->subframe,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_ue_information
.
rnti
,
(
uint8_t
*
)
NULL
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
length
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
timing_advance
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
ul_cqi
);
}
else
{
LOG_D
(
MAC
,
"Frame %d, Subframe %d Calling rx_sdu (CRC ok)
\n
"
,
UL_info
->
frame
,
UL_info
->
subframe
);
rx_sdu
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
NFAPI_SFNSF2SFN
(
UL_info
->
rx_ind
.
sfn_sf
),
//UL_info->frame,
NFAPI_SFNSF2SF
(
UL_info
->
rx_ind
.
sfn_sf
),
//UL_info->subframe,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_ue_information
.
rnti
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
data
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
length
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
timing_advance
,
UL_info
->
rx_ind
.
rx_indication_body
.
rx_pdu_list
[
i
].
rx_indication_rel8
.
ul_cqi
);
}
break
;
}
//if (UL_info->crc_ind.crc_pdu_list[j].rx_ue_information.rnti ==
// UL_info->rx_ind.rx_pdu_list[i].rx_ue_information.rnti)
}
// for (j=0;j<UL_info->crc_ind.crc_indication_body.number_of_crcs;j++)
}
// for (i=0;i<UL_info->rx_ind.number_of_pdus;i++)
UL_info
->
crc_ind
.
crc_indication_body
.
number_of_crcs
=
0
;
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
=
0
;
}
// UL_info->rx_ind.rx_indication_body.number_of_pdus>0 && UL_info->subframe && UL_info->crc_ind.crc_indication_body.number_of_crcs>0
else
if
(
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
!=
0
||
UL_info
->
crc_ind
.
crc_indication_body
.
number_of_crcs
!=
0
)
{
LOG_E
(
PHY
,
"hoping not to have mis-match between CRC ind and RX ind - hopefully the missing message is coming shortly rx_ind:%d(SFN/SF:%05d) crc_ind:%d(SFN/SF:%05d) UL_info(SFN/SF):%04d%d
\n
"
,
UL_info
->
rx_ind
.
rx_indication_body
.
number_of_pdus
,
NFAPI_SFNSF2DEC
(
UL_info
->
rx_ind
.
sfn_sf
),
UL_info
->
crc_ind
.
crc_indication_body
.
number_of_crcs
,
NFAPI_SFNSF2DEC
(
UL_info
->
crc_ind
.
sfn_sf
),
UL_info
->
frame
,
UL_info
->
subframe
);
}
}
}
void
NR_UL_indication
(
NR_UL_IND_t
*
UL_info
)
{
...
...
@@ -56,18 +264,18 @@ void NR_UL_indication(NR_UL_IND_t *UL_info)
clear_nfapi_information
(
RC
.
mac
[
module_id
],
CC_id
,
UL_info
->
frame
,
UL_info
->
subframe
);
handle_rach
(
UL_info
);
handle_
nr_
rach
(
UL_info
);
handle_sr
(
UL_info
);
handle_
nr_
sr
(
UL_info
);
handle_cqi
(
UL_info
);
handle_
nr_
cqi
(
UL_info
);
handle_harq
(
UL_info
);
handle_
nr_
harq
(
UL_info
);
// clear HI prior to handling ULSCH
mac
->
HI_DCI0_req
[
CC_id
].
hi_dci0_request_body
.
number_of_hi
=
0
;
handle_ulsch
(
UL_info
);
handle_
nr_
ulsch
(
UL_info
);
if
(
nfapi_mode
!=
1
)
{
...
...
openair2/RRC/LTE/rrc_eNB.c
View file @
a98bf76d
...
...
@@ -94,6 +94,8 @@
#include "SIMULATION/TOOLS/sim.h" // for taus
#include "PHY/LTE_TRANSPORT/transport_proto.h"
//#define XER_PRINT
extern
RAN_CONTEXT_t
RC
;
...
...
openair2/UTIL/LOG/log.h
View file @
a98bf76d
...
...
@@ -185,11 +185,11 @@ typedef enum {
LOCALIZE
,
RRH
,
X2AP
,
MAX_LOG_COMPONENTS
,
GNB_APP
,
NR_RRC
,
NR_MAC
,
NR_PHY
,
MAX_LOG_COMPONENTS
,
}
comp_name_t
;
...
...
targets/RT/USER/nr-gnb.c
View file @
a98bf76d
...
...
@@ -926,9 +926,9 @@ void init_gNB(int single_thread_flag,int wait_for_sync) {
#endif
LOG_I
(
PHY
,
"Registering with MAC interface module
\n
"
);
AssertFatal
((
gNB
->
if_inst
=
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
->
PHY_config_req
=
phy_config_request
;
gNB
->
if_inst
->
PHY_config_req
=
nr_
phy_config_request
;
nr_phy_config_request
(
gNB
);
memset
((
void
*
)
&
gNB
->
UL_INFO
,
0
,
sizeof
(
gNB
->
UL_INFO
));
memset
((
void
*
)
&
gNB
->
Sched_INFO
,
0
,
sizeof
(
gNB
->
Sched_INFO
));
...
...
targets/RT/USER/nr-softmodem.c
View file @
a98bf76d
...
...
@@ -56,7 +56,7 @@
#include "LAYER2/MAC/mac_proto.h"
#include "RRC/LTE/rrc_vars.h"
#include "PHY_INTERFACE/phy_interface_vars.h"
#include "gnb_config.h"
#ifdef SMBV
#include "PHY/TOOLS/smbv.h"
unsigned
short
config_frames
[
4
]
=
{
2
,
9
,
11
,
13
};
...
...
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