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
spbro
OpenXG-RAN
Commits
9fe2c0bd
Commit
9fe2c0bd
authored
Feb 22, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_cleanup' into integration_2023_w08
parents
d7ba0230
fc30280a
Changes
44
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
26 additions
and
757 deletions
+26
-757
CMakeLists.txt
CMakeLists.txt
+0
-3
common/utils/nr/nr_common.h
common/utils/nr/nr_common.h
+7
-0
doc/Doxyfile
doc/Doxyfile
+0
-1
nfapi/oai_integration/nfapi_vnf.c
nfapi/oai_integration/nfapi_vnf.c
+1
-0
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+0
-1
openair1/PHY/INIT/nr_init_ru.c
openair1/PHY/INIT/nr_init_ru.c
+0
-4
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
+0
-1
openair1/PHY/NR_TRANSPORT/dlsch_pdu_rel15.time_alloc_list_flag
...ir1/PHY/NR_TRANSPORT/dlsch_pdu_rel15.time_alloc_list_flag
+0
-0
openair1/PHY/NR_TRANSPORT/dlsch_pdu_rel15.time_allocation_type
...ir1/PHY/NR_TRANSPORT/dlsch_pdu_rel15.time_allocation_type
+0
-0
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
+0
-14
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+0
-1
openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
+1
-207
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+0
-1
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+0
-1
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
+1
-133
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
+0
-2
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+2
-24
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+0
-84
openair1/PHY/impl_defs_nr.h
openair1/PHY/impl_defs_nr.h
+0
-6
openair1/PHY/phy_vars_nr_ue.h
openair1/PHY/phy_vars_nr_ue.h
+0
-88
openair1/SCHED_NR/extern.h
openair1/SCHED_NR/extern.h
+0
-0
openair1/SCHED_NR/fapi_nr_l1.h
openair1/SCHED_NR/fapi_nr_l1.h
+0
-1
openair1/SCHED_NR/nr_prach_procedures.c
openair1/SCHED_NR/nr_prach_procedures.c
+0
-1
openair1/SCHED_NR/nr_ru_procedures.c
openair1/SCHED_NR/nr_ru_procedures.c
+0
-1
openair1/SCHED_NR/phy_frame_config_nr.h
openair1/SCHED_NR/phy_frame_config_nr.h
+2
-0
openair1/SCHED_NR/phy_procedures_nr_common.c
openair1/SCHED_NR/phy_procedures_nr_common.c
+0
-35
openair1/SCHED_NR/sched_nr.h
openair1/SCHED_NR/sched_nr.h
+0
-1
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+0
-1
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+0
-1
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+0
-74
openair1/SCHED_NR_UE/pucch_uci_ue_nr.h
openair1/SCHED_NR_UE/pucch_uci_ue_nr.h
+0
-8
openair2/LAYER2/MAC/eNB_scheduler.c
openair2/LAYER2/MAC/eNB_scheduler.c
+0
-1
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+3
-0
openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h
+0
-14
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+1
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+0
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+0
-14
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+2
-8
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+0
-1
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+5
-10
openair2/RRC/NR/nr_rrc_common.c
openair2/RRC/NR/nr_rrc_common.c
+0
-1
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+1
-7
openair2/RRC/NR/nr_rrc_extern.h
openair2/RRC/NR/nr_rrc_extern.h
+0
-2
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+0
-4
No files found.
CMakeLists.txt
View file @
9fe2c0bd
...
...
@@ -830,7 +830,6 @@ target_link_libraries(SCHED_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc)
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
${
OPENAIR1_DIR
}
/SCHED_NR/nr_prach_procedures.c
${
OPENAIR1_DIR
}
/SCHED_NR/phy_frame_config_nr.c
...
...
@@ -858,7 +857,6 @@ target_link_libraries(SCHED_UE_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc)
set
(
SCHED_SRC_NR_UE
${
OPENAIR1_DIR
}
/SCHED_NR_UE/phy_procedures_nr_ue.c
${
OPENAIR1_DIR
}
/SCHED_NR/phy_procedures_nr_common.c
${
OPENAIR1_DIR
}
/SCHED_NR_UE/fapi_nr_ue_l1.c
${
OPENAIR1_DIR
}
/SCHED_NR_UE/phy_frame_config_nr_ue.c
${
OPENAIR1_DIR
}
/SCHED_NR_UE/harq_nr.c
...
...
@@ -2541,7 +2539,6 @@ target_compile_definitions(nr_dlsim PUBLIC -DPHYSICAL_SIMULATOR)
add_executable
(
nr_prachsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/prachsim.c
${
OPENAIR_DIR
}
/common/utils/nr/nr_common.c
${
OPENAIR1_DIR
}
/SCHED_NR/phy_procedures_nr_common.c
${
OPENAIR2_DIR
}
/RRC/NAS/nas_config.c
${
OPENAIR1_DIR
}
/SIMULATION/ETH_TRANSPORT/netlink_init.c
${
NR_UE_RRC_DIR
}
/rrc_nsa.c
...
...
common/utils/nr/nr_common.h
View file @
9fe2c0bd
...
...
@@ -40,6 +40,13 @@
#define MAX_BWP_SIZE 275
#define NR_MAX_NUM_BWP 4
#define NR_MAX_HARQ_PROCESSES 16
#define NR_NB_REG_PER_CCE 6
#define NR_NB_SC_PER_RB 12
typedef
enum
{
nr_FR1
=
0
,
nr_FR2
}
nr_frequency_range_e
;
typedef
struct
nr_bandentry_s
{
int16_t
band
;
...
...
doc/Doxyfile
View file @
9fe2c0bd
...
...
@@ -2097,7 +2097,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h \
@CMAKE_CURRENT_SOURCE_DIR@/../nfapi/open-nFAPI/sim_common/inc/vendor_ext.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/nr_prach_procedures.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/phy_procedures_nr_common.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/phy_procedures_nr_gNB.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/fapi_nr_l1.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR/nr_ru_procedures.c \
...
...
nfapi/oai_integration/nfapi_vnf.c
View file @
9fe2c0bd
...
...
@@ -41,6 +41,7 @@
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include "executables/lte-softmodem.h"
#include "openair1/PHY/defs_gNB.h"
#include "common/ran_context.h"
#include "openair2/PHY_INTERFACE/queue_t.h"
...
...
openair1/PHY/INIT/nr_init.c
View file @
9fe2c0bd
...
...
@@ -23,7 +23,6 @@
#include "common/utils/nr/nr_common.h"
#include "common/ran_context.h"
#include "PHY/defs_gNB.h"
#include "PHY/phy_extern.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
...
...
openair1/PHY/INIT/nr_init_ru.c
View file @
9fe2c0bd
...
...
@@ -21,10 +21,6 @@
#include "phy_init.h"
#include "SCHED/sched_common.h"
/*#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "MBSFN-SubframeConfigList.h"*/
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "assertions.h"
#include <math.h>
...
...
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
View file @
9fe2c0bd
...
...
@@ -32,7 +32,6 @@
#include "PHY/types.h"
#include "PHY/defs_gNB.h"
#include "PHY/phy_extern.h"
#include "nr_ul_estimation.h"
#define I0_SKIP_DC 1
...
...
openair1/PHY/NR_TRANSPORT/dlsch_pdu_rel15.time_alloc_list_flag
deleted
100644 → 0
View file @
d7ba0230
openair1/PHY/NR_TRANSPORT/dlsch_pdu_rel15.time_allocation_type
deleted
100644 → 0
View file @
d7ba0230
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
View file @
9fe2c0bd
...
...
@@ -35,20 +35,6 @@
#include "PHY/defs_gNB.h"
void
nr_get_time_domain_allocation_type
(
nfapi_nr_config_request_t
config
,
nfapi_nr_dl_tti_pdcch_pdu
dci_pdu
,
nfapi_nr_dl_tti_pdsch_pdu
*
pdsch_pdu
);
void
nr_check_time_alloc
(
uint8_t
S
,
uint8_t
L
,
nfapi_nr_dl_tti_pdsch_pdu_rel15_t
*
rel15
,
nfapi_nr_config_request_t
*
cfg
);
uint16_t
get_RIV
(
uint16_t
rb_start
,
uint16_t
L
,
uint16_t
N_RB
);
uint8_t
nr_get_S
(
uint8_t
row_idx
,
uint8_t
CP
,
uint8_t
time_alloc_type
,
uint8_t
dmrs_typeA_position
);
void
nr_get_rbg_parms
(
NR_BWP_PARMS
*
bwp
,
uint8_t
config_type
);
void
nr_get_rbg_list
(
uint32_t
bitmap
,
uint8_t
n_rbg
,
uint8_t
*
rbg_list
);
void
nr_pdsch_codeword_scrambling
(
uint8_t
*
in
,
uint32_t
size
,
uint8_t
q
,
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
9fe2c0bd
...
...
@@ -31,7 +31,6 @@
*/
#include "PHY/defs_gNB.h"
#include "PHY/phy_extern.h"
#include "PHY/CODING/coding_extern.h"
#include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/lte_interleaver_inline.h"
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
View file @
9fe2c0bd
...
...
@@ -36,214 +36,8 @@
extern
void
set_taus_seed
(
unsigned
int
seed_type
);
uint8_t
nr_pdsch_default_time_alloc_A_S_nCP
[
23
]
=
{
2
,
3
,
2
,
3
,
2
,
3
,
2
,
3
,
2
,
3
,
9
,
10
,
4
,
6
,
5
,
5
,
9
,
12
,
1
,
1
,
2
,
4
,
8
};
uint8_t
nr_pdsch_default_time_alloc_A_L_nCP
[
23
]
=
{
12
,
11
,
10
,
9
,
9
,
8
,
7
,
6
,
5
,
4
,
4
,
4
,
4
,
4
,
7
,
2
,
2
,
2
,
13
,
6
,
4
,
7
,
4
};
uint8_t
nr_pdsch_default_time_alloc_A_S_eCP
[
23
]
=
{
2
,
3
,
2
,
3
,
2
,
3
,
2
,
3
,
2
,
3
,
6
,
8
,
4
,
6
,
5
,
5
,
9
,
10
,
1
,
1
,
2
,
4
,
8
};
uint8_t
nr_pdsch_default_time_alloc_A_L_eCP
[
23
]
=
{
6
,
5
,
10
,
9
,
9
,
8
,
7
,
6
,
5
,
4
,
4
,
2
,
4
,
4
,
6
,
2
,
2
,
2
,
11
,
6
,
4
,
6
,
4
};
uint8_t
nr_pdsch_default_time_alloc_B_S
[
16
]
=
{
2
,
4
,
6
,
8
,
10
,
2
,
4
,
2
,
4
,
6
,
8
,
10
,
2
,
2
,
3
,
2
};
uint8_t
nr_pdsch_default_time_alloc_B_L
[
16
]
=
{
2
,
2
,
2
,
2
,
2
,
2
,
2
,
4
,
4
,
4
,
4
,
4
,
7
,
12
,
11
,
4
};
uint8_t
nr_pdsch_default_time_alloc_C_S
[
15
]
=
{
2
,
4
,
6
,
8
,
10
,
2
,
4
,
6
,
8
,
10
,
2
,
2
,
3
,
0
,
2
};
uint8_t
nr_pdsch_default_time_alloc_C_L
[
15
]
=
{
2
,
2
,
2
,
2
,
2
,
4
,
4
,
4
,
4
,
4
,
7
,
12
,
11
,
6
,
6
};
/// Time domain allocation routines
/*
void nr_get_time_domain_allocation_type(nfapi_nr_config_request_t config,
nfapi_nr_dl_config_dci_dl_pdu dci_pdu,
nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu) {
nfapi_nr_dl_config_pdcch_parameters_rel15_t params_rel15 = dci_pdu.pdcch_params_rel15;
uint8_t *alloc_type = &dlsch_pdu->dlsch_pdu_rel15.time_allocation_type;
uint8_t mux_pattern = params_rel15.mux_pattern;
uint8_t alloc_list_flag = dlsch_pdu->dlsch_pdu_rel15.time_alloc_list_flag;
switch(params_rel15.rnti_type) {
case NFAPI_NR_RNTI_SI:
AssertFatal(params_rel15.common_search_space_type == NFAPI_NR_COMMON_SEARCH_SPACE_TYPE_0,
"Invalid common search space type %d for SI RNTI, expected %d\n",
params_rel15.common_search_space_type, NFAPI_NR_COMMON_SEARCH_SPACE_TYPE_0);
if (mux_pattern == NFAPI_NR_SSB_AND_CSET_MUX_PATTERN_TYPE1)
AssertFatal(config.subframe_config.dl_cyclic_prefix_type.value == NFAPI_CP_NORMAL,
"Invalid configuration CP extended for SI RNTI type 0 search space\n");
*alloc_type = (mux_pattern == NFAPI_NR_SSB_AND_CSET_MUX_PATTERN_TYPE1)?NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_DEFAULT_A :
(mux_pattern == NFAPI_NR_SSB_AND_CSET_MUX_PATTERN_TYPE2)?NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_DEFAULT_B :
NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_DEFAULT_C;
break;
case NFAPI_NR_RNTI_RA:
case NFAPI_NR_RNTI_TC:
//AssertFatal(dci_alloc.pdcch_params.common_search_space_type == NFAPI_NR_COMMON_SEARCH_SPACE_TYPE_1,
//"Invalid common search space type %d for RNTI %d, expected %d\n",dci_alloc.pdcch_params.common_search_space_type,
//NFAPI_NR_COMMON_SEARCH_SPACE_TYPE_1, dci_alloc.rnti_type);
*alloc_type = (alloc_list_flag) ? NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_ALLOC_LIST : NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_DEFAULT_A;
break;
case NFAPI_NR_RNTI_P:
break;
case NFAPI_NR_RNTI_C:
case NFAPI_NR_RNTI_CS:
if (params_rel15.search_space_type == NFAPI_NR_SEARCH_SPACE_TYPE_COMMON)
*alloc_type = (alloc_list_flag)? NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_ALLOC_LIST : NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_DEFAULT_A;
else
*alloc_type = NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_ALLOC_LIST;
break;
}
}
static inline uint8_t get_K0(uint8_t row_idx, uint8_t time_alloc_type) {
return ( (time_alloc_type == NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_DEFAULT_A)||
(time_alloc_type == NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_DEFAULT_C)? 0 :
((row_idx==6)||(row_idx==7)||(row_idx==15))? 1 : 0);
}
// ideally combine the calculation of L in the same function once the right struct is defined
uint8_t nr_get_S(uint8_t row_idx, uint8_t CP, uint8_t time_alloc_type, uint8_t dmrs_TypeA_Position) {
uint8_t idx;
//uint8_t S;
switch(time_alloc_type) {
case NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_DEFAULT_A:
idx = (row_idx>7)? (row_idx+6) : (((row_idx-1)<<1)-1+((dmrs_TypeA_Position==2)?0:1));
return ((CP==NFAPI_CP_NORMAL)?nr_pdsch_default_time_alloc_A_S_nCP[idx] : nr_pdsch_default_time_alloc_A_S_eCP[idx]);
break;
case NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_DEFAULT_B:
idx = (row_idx<14)? (row_idx-1) : (row_idx == 14)? row_idx-1+((dmrs_TypeA_Position==2)?0:1) : 15;
return (nr_pdsch_default_time_alloc_B_S[idx]);
break;
case NFAPI_NR_PDSCH_TIME_DOMAIN_ALLOC_TYPE_DEFAULT_C:
AssertFatal((row_idx!=6)&&(row_idx!=7)&&(row_idx<17), "Invalid row index %d in %s %s\n", row_idx, __FUNCTION__, __FILE__);
idx = (row_idx<6)? (row_idx-1) : (row_idx<14)? (row_idx-3) : (row_idx == 14)? row_idx-3+((dmrs_TypeA_Position==2)?0:1) : (row_idx-2);
break;
default:
AssertFatal(0, "Invalid Time domain allocation type %d in %s %s\n", time_alloc_type, __FUNCTION__, __FILE__);
}
return 0; // temp warning fix
}
void nr_check_time_alloc(uint8_t S, uint8_t L,nfapi_nr_dl_config_dlsch_pdu_rel15_t *rel15,nfapi_nr_config_request_t *cfg) {
switch (cfg->subframe_config.dl_cyclic_prefix_type.value) {
case NFAPI_CP_NORMAL:
if (rel15->mapping_type == NFAPI_NR_PDSCH_MAPPING_TYPE_A) {
AssertFatal(S<4, "Invalid value of S(%d) for mapping type A and normal CP\n", S);
if (S==3)
AssertFatal(rel15->dmrs_TypeA_Position == 3, "Invalid S %d for dmrs_TypeA_Position %d\n",
S, rel15->dmrs_TypeA_Position);
AssertFatal((L>2)&&(L<15), "Invalid L %d for mapping type A and normal CP\n", L);
AssertFatal(((S+L)>2)&&((S+L)<15), "Invalid S+L %d for mapping type A and normal CP\n", S+L);
}
else {
AssertFatal(S<13, "Invalid value of S(%d) for mapping type B and normal CP\n", S);
AssertFatal((L>1)&&(L<8), "Invalid L %d for mapping type B and normal CP\n", L);
AssertFatal(((S+L)>1)&&((S+L)<15), "Invalid S+L %d for mapping type B and normal CP\n", S+L);
}
break;
case NFAPI_CP_EXTENDED:
if (rel15->mapping_type == NFAPI_NR_PDSCH_MAPPING_TYPE_A) {
AssertFatal(S<4, "Invalid value of S(%d) for mapping type A and extended CP\n", S);
if (S==3)
AssertFatal(rel15->dmrs_TypeA_Position == 3, "Invalid S %d for dmrs_TypeA_Position %d\n",
S, rel15->dmrs_TypeA_Position);
AssertFatal((L>2)&&(L<13), "Invalid L %d for mapping type A and extended CP\n", L);
AssertFatal(((S+L)>2)&&((S+L)<13), "Invalid S+L %d for mapping type A and extended CP\n", S+L);
}
else {
AssertFatal(S<11, "Invalid value of S(%d) for mapping type B and extended CP\n", S);
AssertFatal((L>1)&&(L<7), "Invalid L %d for mapping type B and extended CP\n", L);
AssertFatal(((S+L)>1)&&((S+L)<13), "Invalid S+L %d for mapping type B and extended CP\n", S+L);
}
break;
}
}
/// Frequency domain allocation routines
// DL alloc type 0
static inline uint8_t get_RBG_size_P(uint16_t n_RB, uint8_t RBG_config) {
if (RBG_config == NFAPI_NR_PDSCH_RBG_CONFIG_TYPE1)
return ((n_RB<37)?2:(n_RB<73)?4:(n_RB<145)?8:16);
else if (RBG_config == NFAPI_NR_PDSCH_RBG_CONFIG_TYPE2)
return ((n_RB<37)?4:(n_RB<73)?8:(n_RB<145)?16:16);
else
AssertFatal(0, "Invalid RBG config type (%d)\n", RBG_config);
}
void nr_get_rbg_parms(NR_BWP_PARMS* bwp, uint8_t config_type) {
nr_rbg_parms_t* rbg_parms = &bwp->rbg_parms;
rbg_parms->P = get_RBG_size_P(bwp->N_RB, config_type);
rbg_parms->start_size = rbg_parms->P - bwp->location%rbg_parms->P;
rbg_parms->end_size = ((bwp->location + bwp->N_RB)%rbg_parms->P)? ((bwp->location + bwp->N_RB)%rbg_parms->P) : rbg_parms->P;
rbg_parms->N_RBG = (uint8_t)ceil( (bwp->N_RB + (bwp->location%rbg_parms->P))/(float)rbg_parms->P);
LOG_I(PHY, "RBG parameters for BWP %d location %d N_RB %d:\n", bwp->bwp_id, bwp->location, bwp->N_RB);
LOG_I(PHY, "P %d\t start size %d\t endsize %d\t N_RBG %d\n", rbg_parms->P, rbg_parms->start_size, rbg_parms->end_size, rbg_parms->N_RBG);
}
void nr_get_rbg_list(uint32_t bitmap, uint8_t n_rbg, uint8_t* rbg_list) {
uint8_t idx=0;
for (int i=0; i<n_rbg; i++)
if ((bitmap>>(n_rbg-i-1))&1)
rbg_list[idx++]=i;
}
// DL alloc type 1
uint16_t get_RIV(uint16_t rb_start, uint16_t L, uint16_t N_RB) {
if ((L-1)<=(N_RB>>1))
return (N_RB*(L-1)+rb_start);
else
return (N_RB*(N_RB-L+1) + (N_RB-1-rb_start));
}
/// PRB bundling routines
// Precoding granularity
static inline uint8_t nr_get_P_prime(uint8_t rnti_type, uint8_t dci_format, uint8_t prb_bundling_type) {
if (dci_format == NFAPI_NR_DL_DCI_FORMAT_1_0)
return (NFAPI_NR_PRG_GRANULARITY_2);
else // NFAPI_NR_DL_DCI_FORMAT_1_1
return ((prb_bundling_type)?0:2);// incomplete for 1_1
}
void nr_get_PRG_parms(NR_BWP_PARMS* bwp, NR_gNB_DCI_ALLOC_t dci_alloc, uint8_t prb_bundling_type) {
nr_prg_parms_t* prg_parms = &bwp->prg_parms;
prg_parms->P_prime = nr_get_P_prime(dci_alloc.pdcch_params.rnti_type, dci_alloc.pdcch_params.dci_format, prb_bundling_type);
prg_parms->start_size = prg_parms->P_prime - bwp->location%prg_parms->P_prime;
prg_parms->end_size = (bwp->location + bwp->N_RB)%prg_parms->P_prime;
if (!prg_parms->end_size)
prg_parms->end_size = prg_parms->P_prime;
prg_parms->N_PRG = ceil((float)bwp->N_RB/prg_parms->P_prime);
LOG_I(PHY, "PRG parameters for BWP %d location %d N_RB %d:\n", bwp->bwp_id, bwp->location, bwp->N_RB);
LOG_I(PHY, "P_prime %d\t start size %d\t endsize %d\t N_PRG %d\n", prg_parms->P_prime, prg_parms->start_size, prg_parms->end_size, prg_parms->N_PRG);
}
*/
/// Payload emulation
/// Payload emulation
void
nr_emulate_dlsch_payload
(
uint8_t
*
pdu
,
uint16_t
size
)
{
set_taus_seed
(
0
);
for
(
int
i
=
0
;
i
<
size
;
i
++
)
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
9fe2c0bd
...
...
@@ -33,7 +33,6 @@
// [from gNB coding]
#include "PHY/defs_gNB.h"
#include "PHY/phy_extern.h"
#include "PHY/CODING/coding_extern.h"
#include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/lte_interleaver_inline.h"
...
...
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
View file @
9fe2c0bd
...
...
@@ -59,7 +59,6 @@ char nr_dci_format_string[8][30] = {
//#define DEBUG_DCI_DECODING 1
//#define NR_LTE_PDCCH_DCI_SWITCH
//#define NR_PDCCH_DCI_DEBUG // activates NR_PDCCH_DCI_DEBUG logs
#ifdef NR_PDCCH_DCI_DEBUG
#define LOG_DDD(a, ...) printf("<-NR_PDCCH_DCI_DEBUG (%s)-> " a, __func__, ##__VA_ARGS__ )
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
View file @
9fe2c0bd
...
...
@@ -35,22 +35,10 @@
#include "PHY/impl_defs_top.h"
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
//#include "PHY/defs_nr_UE.h"
#include "nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h"
#include "../NR_TRANSPORT/nr_transport_common_proto.h"
/*#ifndef STANDALONE_COMPILE
#include "UTIL/LISTS/list.h"
#endif
*/
#include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h"
// structures below implement 36-211 and 36-212
/** @addtogroup _PHY_TRANSPORT_
* @{
*/
typedef
enum
{
NEW_TRANSMISSION_HARQ
,
RETRANSMISSION_HARQ
...
...
@@ -63,10 +51,6 @@ typedef struct {
harq_result_t
tx_status
;
/// Status Flag indicating for this ULSCH (idle,active,disabled)
SCH_status_t
status
;
/// Subframe scheduling indicator (i.e. Transmission opportunity indicator)
uint8_t
subframe_scheduling_flag
;
/// Subframe cba scheduling indicator (i.e. Transmission opportunity indicator)
uint8_t
subframe_cba_scheduling_flag
;
/// Last TPC command
uint8_t
TPC
;
/// The payload + CRC size in bits, "B" from 36-212
...
...
@@ -101,16 +85,10 @@ typedef struct {
uint8_t
n_DMRS
;
/// n_DMRS2 for cyclic shift of DMRS
uint8_t
n_DMRS2
;
/// Flag to indicate that this is a control only ULSCH (i.e. no MAC SDU)
uint8_t
control_only
;
/// Flag to indicate that this is a calibration ULSCH (i.e. no MAC SDU and filled with TDD calibration information)
// int calibration_flag;
/// Number of soft channel bits
uint32_t
G
;
// Number of modulated symbols carrying data
uint32_t
num_of_mod_symbols
;
// decode phich
uint8_t
decode_phich
;
// Encoder BG
uint8_t
BG
;
// LDPC lifting size
...
...
@@ -120,44 +98,14 @@ typedef struct {
typedef
struct
{
/// NDAPI struct for UE
nfapi_nr_ue_pusch_pdu_t
pusch_pdu
;
/// SRS active flag
uint8_t
srs_active
;
// UL number of harq processes
uint8_t
number_harq_processes_for_pusch
;
/// Minimum number of CQI bits for PUSCH (36-212 r8.6, Sec 5.2.4.1 p. 37)
uint8_t
O_CQI_MIN
;
/// ACK/NAK Bundling flag
uint8_t
bundling
;
/// beta_offset_cqi times 8
uint16_t
beta_offset_cqi_times8
;
/// beta_offset_ri times 8
uint16_t
beta_offset_ri_times8
;
/// beta_offset_harqack times 8
uint16_t
beta_offset_harqack_times8
;
/// power_offset
uint8_t
power_offset
;
// for cooperative communication
uint8_t
cooperation_flag
;
/// RNTI type
uint8_t
rnti_type
;
/// Cell ID
int
Nid_cell
;
/// f_PUSCH parameter for PUSCH power control
int16_t
f_pusch
;
/// Po_PUSCH - target output power for PUSCH
int16_t
Po_PUSCH
;
/// PHR - current power headroom (based on last PUSCH transmission)
int16_t
PHR
;
/// Po_SRS - target output power for SRS
int16_t
Po_SRS
;
/// num active cba group
uint8_t
num_active_cba_groups
;
/// bit mask of PT-RS ofdm symbol indicies
uint16_t
ptrs_symbols
;
/// num dci found for cba
//uint8_t num_cba_dci[10];
/// allocated CBA RNTI
//uint16_t cba_rnti[4];//NUM_MAX_CBA_GROUP];
}
NR_UE_ULSCH_t
;
typedef
struct
{
...
...
@@ -180,8 +128,6 @@ typedef struct {
int16_t
**
d
;
/// Index of current HARQ round for this DLSCH
uint8_t
DLround
;
/// MIMO mode for this DLSCH
MIMO_nrmode_t
mimo_mode
;
/// Number of code segments
uint32_t
C
;
/// Number of bits in code segments
...
...
@@ -190,20 +136,8 @@ typedef struct {
uint32_t
F
;
/// LDPC lifting factor
uint32_t
Z
;
/// current delta_pucch
int8_t
delta_PUCCH
;
/// Number of soft channel bits
uint32_t
G
;
/// Current subband PMI allocation
uint16_t
pmi_alloc
;
/// Current RB allocation (even slots)
uint32_t
rb_alloc_even
[
4
];
/// Current RB allocation (odd slots)
uint32_t
rb_alloc_odd
[
4
];
/// distributed/localized flag
vrb_t
vrb_type
;
/// downlink power offset field
uint8_t
dl_power_off
;
/// codeword this transport block is mapped to
uint8_t
codeword
;
/// HARQ-ACKs
...
...
@@ -220,28 +154,8 @@ typedef struct {
uint8_t
rnti_type
;
/// Active flag for DLSCH demodulation
bool
active
;
/// Transmission mode
uint8_t
mode1_flag
;
/// amplitude of PDSCH (compared to RS) in symbols without pilots
int16_t
sqrt_rho_a
;
/// amplitude of PDSCH (compared to RS) in symbols containing pilots
int16_t
sqrt_rho_b
;
/// Current subband antenna selection
uint32_t
antenna_alloc
;
/// Current subband RI allocation
uint32_t
ri_alloc
;
/// Current subband CQI1 allocation
uint32_t
cqi_alloc1
;
/// Current subband CQI2 allocation
uint32_t
cqi_alloc2
;
/// saved subband PMI allocation from last PUSCH/PUCCH report
uint16_t
pmi_alloc
;
/// Structure to hold dlsch config from MAC
fapi_nr_dl_config_dlsch_pdu_rel15_t
dlsch_config
;
/* higher layer parameter for reception of two transport blocks TS 38.213 9.1.3.1 Type-2 HARQ-ACK codebook dtermination */
uint8_t
Number_MCS_HARQ_DL_DCI
;
/* spatial bundling of PUCCH */
uint8_t
HARQ_ACK_spatial_bundling_PUCCH
;
/// Number of MIMO layers (streams)
uint8_t
Nl
;
/// Maximum number of LDPC iterations
...
...
@@ -254,52 +168,6 @@ typedef struct {
uint8_t
ptrs_symbol_index
;
}
NR_UE_DLSCH_t
;
typedef
enum
{
format0_0
,
format0_1
,
format1_0
,
format1_1
,
format2_0
,
format2_1
,
format2_2
,
format2_3
}
NR_DCI_format_t
;
typedef
enum
{
nr_pucch_format0
=
0
,
nr_pucch_format1
,
nr_pucch_format2
,
nr_pucch_format3
,
nr_pucch_format4
}
NR_PUCCH_FMT_t
;
typedef
struct
{
/// Length of DCI in bits
uint8_t
dci_length
;
/// Aggregation level
uint8_t
L
;
/// Position of first CCE of the dci
int
firstCCE
;
/// flag to indicate that this is a RA response
bool
ra_flag
;
/// rnti
rnti_t
rnti
;
/// rnti type
//crc_scrambled_t rnti_type;
/// Format
NR_DCI_format_t
format
;
/// search space
dci_space_t
search_space
;
/// DCI pdu
uint64_t
dci_pdu
[
2
];
//#if defined(UPGRADE_RAT_NR)
#if 1
/// harq information
uint8_t
harq_pid_pusch
;
/// delay between current slot and slot to transmit
uint8_t
number_slots_rx_to_tx
;
#endif
}
NR_DCI_ALLOC_t
;
/**@}*/
#endif
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
View file @
9fe2c0bd
...
...
@@ -31,7 +31,6 @@
*/
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/coding_extern.h"
...
...
@@ -39,7 +38,6 @@
#include "PHY/CODING/nrLDPC_extern.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include <openair2/UTIL/OPT/opt.h>
//#define DEBUG_ULSCH_CODING
...
...
openair1/PHY/defs_gNB.h
View file @
9fe2c0bd
...
...
@@ -33,7 +33,6 @@
#ifndef __PHY_DEFS_GNB__H__
#define __PHY_DEFS_GNB__H__
#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"
...
...
@@ -43,10 +42,9 @@
#include "PHY/CODING/nrLDPC_extern.h"
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
#include "executables/rt_profiling.h"
#include "nfapi_nr_interface_scf.h"
#define MAX_NUM_RU_PER_gNB
MAX_NUM_RU_PER_eNB
#define MAX_NUM_RU_PER_gNB
8
#define MAX_PUCCH0_NID 8
typedef
struct
{
...
...
@@ -63,14 +61,6 @@ typedef struct {
uint32_t
pbch_e
[
NR_POLAR_PBCH_E_DWORD
];
}
NR_gNB_PBCH
;
typedef
struct
{
uint8_t
ssb_start_symbol
;
uint8_t
n_hf
;
uint8_t
Lmax
;
uint8_t
ssb_index
;
int32_t
sfn
;
}
NR_PBCH_parms_t
;
typedef
enum
{
NR_SCH_IDLE
,
...
...
@@ -101,23 +91,11 @@ typedef struct {
uint32_t
Z
;
}
NR_DL_gNB_HARQ_t
;
typedef
struct
{
int
frame
;
int
slot
;
nfapi_nr_dl_tti_pdcch_pdu
pdcch_pdu
;
}
NR_gNB_PDCCH_t
;
typedef
struct
{
uint8_t
active
;
nfapi_nr_dl_tti_csi_rs_pdu
csirs_pdu
;
}
NR_gNB_CSIRS_t
;
typedef
struct
{
int
frame
;
int
slot
;
nfapi_nr_ul_dci_request_pdus_t
pdcch_pdu
;
}
NR_gNB_UL_PDCCH_t
;
typedef
struct
{
int
frame
;
int
dump_frame
;
...
...
@@ -569,7 +547,7 @@ typedef struct {
int
prach_I0
;
}
PHY_MEASUREMENTS_gNB
;
#define MAX_NUM_NR_PRACH_PREAMBLES 64
#define MAX_NUM_NR_RX_RACH_PDUS 4
#define MAX_NUM_NR_RX_PRACH_PREAMBLES 4
#define MAX_UL_PDUS_PER_SLOT 8
...
...
openair1/PHY/defs_nr_common.h
View file @
9fe2c0bd
...
...
@@ -45,9 +45,6 @@
#define MAX_NUM_SUBCARRIER_SPACING 5
#define NR_MAX_OFDM_SYMBOL_SIZE 4096
#define NR_NB_SC_PER_RB 12
#define NR_NB_REG_PER_CCE 6
#define NR_SYMBOLS_PER_SLOT 14
#define ONE_OVER_SQRT2_Q15 23170
...
...
@@ -81,44 +78,23 @@
#define NR_MAX_DCI_SIZE_DWORD 54 // ceil(NR_MAX_DCI_SIZE/32)
#define NR_MAX_PDCCH_AGG_LEVEL 16 // 3GPP TS 38.211 V15.8 Section 7.3.2 Table 7.3.2.1-1: Supported PDCCH aggregation levels
#define NR_MAX_CSET_DURATION 3
#define NR_MAX_NB_RBG 18
#define NR_MAX_NB_LAYERS 4 // 8
#define NR_MAX_NB_PORTS 32
#define NR_MAX_NB_HARQ_PROCESSES 16
#define NR_MAX_PDSCH_TBS 3824
#define MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER 36
#define MAX_NUM_NR_ULSCH_SEGMENTS_PER_LAYER 34
#define MAX_NUM_NR_CHANNEL_BITS (4*14*273*12*8) // 14 symbols, 273 RB
#define MAX_NUM_NR_RE (4*14*273*12)
#define MAX_NUM_NR_SRS_SYMBOLS 4
#define MAX_NUM_NR_SRS_AP 4
#define NR_RX_NB_TH 1
#define NR_NB_TH_SLOT 2
#define NR_NB_NSCID 2
extern
const
uint8_t
nr_rv_round_map
[
4
];
static
inline
uint8_t
nr_rv_to_round
(
uint8_t
rv
)
{
for
(
uint8_t
round
=
0
;
round
<
4
;
round
++
)
{
if
(
nr_rv_round_map
[
round
]
==
rv
)
return
round
;
}
return
0
;
}
typedef
enum
{
NR_MU_0
=
0
,
NR_MU_1
,
...
...
@@ -127,14 +103,6 @@ typedef enum {
NR_MU_4
,
}
nr_numerology_index_e
;
typedef
enum
{
kHz15
=
0
,
kHz30
,
kHz60
,
kHz120
,
kHz240
}
nr_scs_e
;
typedef
enum
{
nr_ssb_type_A
=
0
,
nr_ssb_type_B
,
...
...
@@ -143,58 +111,6 @@ typedef enum{
nr_ssb_type_E
}
nr_ssb_type_e
;
typedef
enum
{
nr_FR1
=
0
,
nr_FR2
}
nr_frequency_range_e
;
typedef
enum
{
MOD_BPSK
=
0
,
MOD_QPSK
,
MOD_QAM16
,
MOD_QAM64
,
MOD_QAM256
}
nr_mod_t
;
typedef
struct
{
/// Size of first RBG
uint8_t
start_size
;
/// Nominal size
uint8_t
P
;
/// Size of last RBG
uint8_t
end_size
;
/// Number of RBG
uint8_t
N_RBG
;
}
nr_rbg_parms_t
;
typedef
struct
{
/// Size of first PRG
uint8_t
start_size
;
/// Nominal size
uint8_t
P_prime
;
/// Size of last PRG
uint8_t
end_size
;
/// Number of PRG
uint8_t
N_PRG
;
}
nr_prg_parms_t
;
typedef
struct
NR_BWP_PARMS
{
/// BWP ID
uint8_t
bwp_id
;
/// Subcarrier spacing
nr_scs_e
scs
;
/// Freq domain location -- 1st CRB index
uint8_t
location
;
/// Bandwidth in PRB
uint16_t
N_RB
;
/// Cyclic prefix
uint8_t
cyclic_prefix
;
/// RBG params
nr_rbg_parms_t
rbg_parms
;
/// PRG params
nr_prg_parms_t
prg_parms
;
}
NR_BWP_PARMS
;
typedef
struct
{
uint8_t
k_0_p
[
MAX_NUM_NR_SRS_AP
][
MAX_NUM_NR_SRS_SYMBOLS
];
uint8_t
srs_generated_signal_bits
;
...
...
openair1/PHY/impl_defs_nr.h
View file @
9fe2c0bd
...
...
@@ -211,12 +211,6 @@ typedef enum {
srs_sl2560
=
16
}
SRS_Periodicity_t
;
#define NB_SRS_PERIOD (18)
static
const
uint16_t
srs_period
[
NB_SRS_PERIOD
]
=
{
0
,
1
,
2
,
4
,
5
,
8
,
10
,
16
,
20
,
32
,
40
,
64
,
80
,
160
,
320
,
640
,
1280
,
2560
}
;
/// SRS_Resource of SRS_Config information element from 38.331 RRC specifications
typedef
struct
{
/// \brief srs resource identity.
...
...
openair1/PHY/phy_vars_nr_ue.h
View file @
9fe2c0bd
This diff is collapsed.
Click to expand it.
openair1/SCHED_NR/extern.h
deleted
100644 → 0
View file @
d7ba0230
openair1/SCHED_NR/fapi_nr_l1.h
View file @
9fe2c0bd
...
...
@@ -31,7 +31,6 @@
*/
#include "PHY/defs_gNB.h"
#include "PHY/phy_extern.h"
#include "SCHED_NR/sched_nr.h"
#include "nfapi_nr_interface.h"
#include "nfapi_nr_interface_scf.h"
...
...
openair1/SCHED_NR/nr_prach_procedures.c
View file @
9fe2c0bd
...
...
@@ -31,7 +31,6 @@
*/
#include "PHY/defs_gNB.h"
#include "PHY/phy_extern.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "nfapi_nr_interface_scf.h"
#include "fapi_nr_l1.h"
...
...
openair1/SCHED_NR/nr_ru_procedures.c
View file @
9fe2c0bd
...
...
@@ -34,7 +34,6 @@
#include "sched_nr.h"
#include "PHY/MODULATION/modulation_common.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "common/utils/LOG/log.h"
#include "common/utils/system.h"
...
...
openair1/SCHED_NR/phy_frame_config_nr.h
View file @
9fe2c0bd
...
...
@@ -29,6 +29,8 @@
*
************************************************************************/
#include "PHY/defs_gNB.h"
#ifndef PHY_FRAME_CONFIG_NR_H
#define PHY_FRAME_CONFIG_NR_H
...
...
openair1/SCHED_NR/phy_procedures_nr_common.c
deleted
100644 → 0
View file @
d7ba0230
/*
* 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 phy_procedures_lte_eNB.c
* \brief Implementation of common utilities for eNB/UE procedures from 36.213 LTE specifications
* \author R. Knopp, F. Kaltenberger
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr
* \note
* \warning
*/
#include "sched_nr.h"
#include "PHY/INIT/phy_init.h"
openair1/SCHED_NR/sched_nr.h
View file @
9fe2c0bd
...
...
@@ -30,7 +30,6 @@
#include "PHY/defs_gNB.h"
#include "PHY_INTERFACE/phy_interface.h"
#include "SCHED/sched_eNB.h"
#include "PHY/NR_TRANSPORT/nr_dci.h"
#include "phy_frame_config_nr.h"
...
...
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
9fe2c0bd
...
...
@@ -35,7 +35,6 @@
#include "fapi_nr_ue_interface.h"
#include "fapi_nr_ue_l1.h"
#include "harq_nr.h"
//#include "PHY/phy_vars_nr_ue.h"
#include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/impl_defs_nr.h"
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
9fe2c0bd
...
...
@@ -43,7 +43,6 @@
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
#include "SCHED_NR/extern.h"
#include "SCHED_NR_UE/phy_sch_processing_time.h"
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
#ifdef EMOS
...
...
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
View file @
9fe2c0bd
...
...
@@ -296,77 +296,3 @@ void set_csi_nr(int csi_status, uint32_t csi_payload)
}
}
uint8_t
get_nb_symbols_pucch
(
NR_PUCCH_Resource_t
*
pucch_resource
,
pucch_format_nr_t
format_type
)
{
switch
(
format_type
)
{
case
pucch_format0_nr
:
return
pucch_resource
->
format
.
choice
.
format0
->
nrofSymbols
;
case
pucch_format1_nr
:
return
pucch_resource
->
format
.
choice
.
format1
->
nrofSymbols
;
case
pucch_format2_nr
:
return
pucch_resource
->
format
.
choice
.
format2
->
nrofSymbols
;
case
pucch_format3_nr
:
return
pucch_resource
->
format
.
choice
.
format3
->
nrofSymbols
;
case
pucch_format4_nr
:
return
pucch_resource
->
format
.
choice
.
format4
->
nrofSymbols
;
}
return
0
;
}
uint16_t
get_starting_symb_idx
(
NR_PUCCH_Resource_t
*
pucch_resource
,
pucch_format_nr_t
format_type
)
{
switch
(
format_type
)
{
case
pucch_format0_nr
:
return
pucch_resource
->
format
.
choice
.
format0
->
startingSymbolIndex
;
case
pucch_format1_nr
:
return
pucch_resource
->
format
.
choice
.
format1
->
startingSymbolIndex
;
case
pucch_format2_nr
:
return
pucch_resource
->
format
.
choice
.
format2
->
startingSymbolIndex
;
case
pucch_format3_nr
:
return
pucch_resource
->
format
.
choice
.
format3
->
startingSymbolIndex
;
case
pucch_format4_nr
:
return
pucch_resource
->
format
.
choice
.
format4
->
startingSymbolIndex
;
}
return
0
;
}
int
get_ics_pucch
(
NR_PUCCH_Resource_t
*
pucch_resource
,
pucch_format_nr_t
format_type
)
{
switch
(
format_type
)
{
case
pucch_format0_nr
:
return
pucch_resource
->
format
.
choice
.
format0
->
initialCyclicShift
;
case
pucch_format1_nr
:
return
pucch_resource
->
format
.
choice
.
format1
->
initialCyclicShift
;
case
pucch_format2_nr
:
return
0
;
default:
return
-
1
;
}
return
-
1
;
}
NR_PUCCH_Resource_t
*
select_resource_by_id
(
int
resource_id
,
NR_PUCCH_Config_t
*
pucch_config
)
{
int
n_list
=
pucch_config
->
resourceToAddModList
->
list
.
count
;
NR_PUCCH_Resource_t
*
pucchres
;
AssertFatal
(
n_list
>
0
,
"PUCCH resourceToAddModList is empty
\n
"
);
for
(
int
i
=
0
;
i
<
n_list
;
i
++
)
{
pucchres
=
pucch_config
->
resourceToAddModList
->
list
.
array
[
i
];
if
(
pucchres
->
pucch_ResourceId
==
resource_id
)
return
pucchres
;
}
return
NULL
;
}
openair1/SCHED_NR_UE/pucch_uci_ue_nr.h
View file @
9fe2c0bd
...
...
@@ -41,7 +41,6 @@
/************** INCLUDE *******************************************/
#include "PHY/defs_nr_UE.h"
#include "RRC/NR_UE/rrc_proto.h"
#ifdef DEFINE_VARIABLES_PUCCH_UE_NR_H
#define EXTERN
...
...
@@ -66,11 +65,4 @@ void pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue,
void
set_csi_nr
(
int
csi_status
,
uint32_t
csi_payload
);
uint8_t
get_nb_symbols_pucch
(
NR_PUCCH_Resource_t
*
pucch_resource
,
pucch_format_nr_t
format_type
);
uint16_t
get_starting_symb_idx
(
NR_PUCCH_Resource_t
*
pucch_resource
,
pucch_format_nr_t
format_type
);
int
get_ics_pucch
(
NR_PUCCH_Resource_t
*
pucch_resource
,
pucch_format_nr_t
format_type
);
NR_PUCCH_Resource_t
*
select_resource_by_id
(
int
resource_id
,
NR_PUCCH_Config_t
*
pucch_config
);
#endif
/* PUCCH_UCI_UE_NR_H */
openair2/LAYER2/MAC/eNB_scheduler.c
View file @
9fe2c0bd
...
...
@@ -43,7 +43,6 @@
#include "OCG_extern.h"
#include "RRC/LTE/rrc_extern.h"
#include "RRC/NR/nr_rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
//#include "LAYER2/MAC/pre_processor.c"
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
9fe2c0bd
...
...
@@ -36,6 +36,9 @@
#include "nr_mac.h"
#include "common/utils/nr/nr_common.h"
#define NB_SRS_PERIOD (18)
static
const
uint16_t
srs_period
[
NB_SRS_PERIOD
]
=
{
0
,
1
,
2
,
4
,
5
,
8
,
10
,
16
,
20
,
32
,
40
,
64
,
80
,
160
,
320
,
640
,
1280
,
2560
};
typedef
enum
{
pusch_dmrs_pos0
=
0
,
pusch_dmrs_pos1
=
1
,
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h
View file @
9fe2c0bd
...
...
@@ -44,20 +44,6 @@ extern dci_pdu_rel15_t *def_dci_pdu_rel15;
/* Scheduler */
extern
RAN_CONTEXT_t
RC
;
extern
uint8_t
nfapi_mode
;
extern
mac_rlc_am_muilist_t
rlc_am_mui
;
extern
SCHEDULER_MODES
global_scheduler_mode
;
/*#if defined(PRE_SCD_THREAD)
extern const int cqi_to_mcs[16];
extern uint8_t rb_table[34];
#if defined(PRE_SCD_THREAD)
extern uint16_t pre_nb_rbs_required[2][MAX_NUM_CCs][NUMBER_OF_UE_MAX];
extern uint8_t dlsch_ue_select_tbl_in_use;
extern uint8_t new_dlsch_ue_select_tbl_in_use;
extern bool pre_scd_activeUE[NUMBER_OF_UE_MAX];
extern eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
#endif*/
extern
const
uint32_t
NR_SHORT_BSR_TABLE
[
NR_SHORT_BSR_TABLE_SIZE
];
extern
const
uint32_t
NR_LONG_BSR_TABLE
[
NR_LONG_BSR_TABLE_SIZE
];
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
9fe2c0bd
...
...
@@ -42,6 +42,7 @@
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
#include "SCHED_NR/phy_frame_config_nr.h"
#include "openair1/PHY/defs_gNB.h"
#include "NR_MIB.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h"
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
9fe2c0bd
...
...
@@ -51,7 +51,6 @@ extern uint16_t sl_ahead;
uint8_t
DELTA
[
4
]
=
{
2
,
3
,
4
,
6
};
#define MAX_NUMBER_OF_SSB 64
float
ssb_per_rach_occasion
[
8
]
=
{
0
.
125
,
0
.
25
,
0
.
5
,
1
,
2
,
4
,
8
};
int16_t
ssb_index_from_prach
(
module_id_t
module_idP
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
9fe2c0bd
...
...
@@ -35,20 +35,6 @@
#include "LAYER2/NR_MAC_COMMON/nr_mac.h"
#include "executables/softmodem-common.h"
#include "common/utils/nr/nr_common.h"
#include "NR_SCS-SpecificCarrier.h"
#include "NR_TDD-UL-DL-ConfigCommon.h"
#include "NR_FrequencyInfoUL.h"
#include "NR_RACH-ConfigGeneric.h"
#include "NR_RACH-ConfigCommon.h"
#include "NR_PUSCH-TimeDomainResourceAllocation.h"
#include "NR_PUSCH-ConfigCommon.h"
#include "NR_PUCCH-ConfigCommon.h"
#include "NR_PDSCH-TimeDomainResourceAllocation.h"
#include "NR_PDSCH-ConfigCommon.h"
#include "NR_RateMatchPattern.h"
#include "NR_RateMatchPatternLTE-CRS.h"
#include "NR_SearchSpace.h"
#include "NR_ControlResourceSet.h"
//#define UL_HARQ_PRINT
extern
RAN_CONTEXT_t
RC
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
9fe2c0bd
...
...
@@ -47,7 +47,6 @@
#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h"
/* TODO REMOVE_DU_RRC: the RRC in the DU is a hack and should be taken out in the future */
#include "RRC/LTE/rrc_extern.h"
#include "RRC/NR/nr_rrc_extern.h"
#include "RRC/NR/rrc_gNB_UE_context.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
...
...
@@ -56,11 +55,6 @@
#include "intertask_interface.h"
#include "T.h"
#include "NR_PDCCH-ConfigCommon.h"
#include "NR_ControlResourceSet.h"
#include "NR_SearchSpace.h"
#include "nfapi_nr_interface.h"
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_gNB_SCHEDULER 1
...
...
@@ -2493,7 +2487,7 @@ void reset_dl_harq_list(NR_UE_sched_ctrl_t *sched_ctrl) {
add_tail_nr_list
(
&
sched_ctrl
->
available_dl_harq
,
harq
);
}
for
(
int
i
=
0
;
i
<
NR_MAX_
NB_
HARQ_PROCESSES
;
i
++
)
{
for
(
int
i
=
0
;
i
<
NR_MAX_HARQ_PROCESSES
;
i
++
)
{
sched_ctrl
->
harq_processes
[
i
].
feedback_slot
=
-
1
;
sched_ctrl
->
harq_processes
[
i
].
round
=
0
;
sched_ctrl
->
harq_processes
[
i
].
is_waiting
=
false
;
...
...
@@ -2512,7 +2506,7 @@ void reset_ul_harq_list(NR_UE_sched_ctrl_t *sched_ctrl) {
add_tail_nr_list
(
&
sched_ctrl
->
available_ul_harq
,
harq
);
}
for
(
int
i
=
0
;
i
<
NR_MAX_
NB_
HARQ_PROCESSES
;
i
++
)
{
for
(
int
i
=
0
;
i
<
NR_MAX_HARQ_PROCESSES
;
i
++
)
{
sched_ctrl
->
ul_harq_processes
[
i
].
feedback_slot
=
-
1
;
sched_ctrl
->
ul_harq_processes
[
i
].
round
=
0
;
sched_ctrl
->
ul_harq_processes
[
i
].
is_waiting
=
false
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
9fe2c0bd
...
...
@@ -27,7 +27,6 @@
*/
#include <softmodem-common.h>
#include "LAYER2/MAC/mac.h"
#include "NR_MAC_gNB/nr_mac_gNB.h"
#include "NR_MAC_COMMON/nr_mac_extern.h"
#include "NR_MAC_gNB/mac_proto.h"
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
9fe2c0bd
...
...
@@ -51,11 +51,8 @@
/* RRC */
#include "NR_BCCH-BCH-Message.h"
#include "NR_CellGroupConfig.h"
#include "NR_ServingCellConfigCommon.h"
#include "NR_MeasConfig.h"
/* PHY */
#include "PHY/defs_gNB.h"
#include "time_meas.h"
/* Interface */
...
...
@@ -64,8 +61,6 @@
#include "mac_rrc_ul.h"
/* MAC */
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h"
#include "NR_TAG.h"
...
...
@@ -80,9 +75,11 @@
/*!\brief Maximum number of random access process */
#define NR_NB_RA_PROC_MAX 4
#define MAX_NUM_OF_SSB 64
#define MAX_NUM_NR_PRACH_PREAMBLES 64
#define MIN_NUM_PRBS_TO_SCHEDULE 5
extern
const
uint8_t
nr_rv_round_map
[
4
];
/*! \brief NR_list_t is a "list" (of users, HARQ processes, slices, ...).
* Especially useful in the scheduler and to keep "classes" of users. */
typedef
struct
{
...
...
@@ -586,7 +583,7 @@ typedef struct {
struct
CSI_Report
CSI_report
;
bool
SR
;
/// information about every HARQ process
NR_UE_harq_t
harq_processes
[
NR_MAX_
NB_
HARQ_PROCESSES
];
NR_UE_harq_t
harq_processes
[
NR_MAX_HARQ_PROCESSES
];
/// HARQ processes that are free
NR_list_t
available_dl_harq
;
/// HARQ processes that await feedback
...
...
@@ -594,7 +591,7 @@ typedef struct {
/// HARQ processes that await retransmission
NR_list_t
retrans_dl_harq
;
/// information about every UL HARQ process
NR_UE_ul_harq_t
ul_harq_processes
[
NR_MAX_
NB_
HARQ_PROCESSES
];
NR_UE_ul_harq_t
ul_harq_processes
[
NR_MAX_HARQ_PROCESSES
];
/// UL HARQ processes that are free
NR_list_t
available_ul_harq
;
/// UL HARQ processes that await feedback
...
...
@@ -671,8 +668,6 @@ typedef struct {
bool
Msg3_dcch_dtch
;
bool
Msg4_ACKed
;
uint32_t
ra_timer
;
/// Sched CSI-RS: scheduling decisions
NR_gNB_UCI_STATS_t
uci_statS
;
float
ul_thr_ue
;
float
dl_thr_ue
;
}
NR_UE_info_t
;
...
...
openair2/RRC/NR/nr_rrc_common.c
View file @
9fe2c0bd
...
...
@@ -39,7 +39,6 @@
#include "asn1_msg.h"
#include "pdcp.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "rrc_eNB_UE_context.h"
#include "common/ran_context.h"
#define DEBUG_NR_RRC 1
...
...
openair2/RRC/NR/nr_rrc_defs.h
View file @
9fe2c0bd
...
...
@@ -45,8 +45,6 @@
#include "mac_rrc_dl.h"
#include "cucp_cuup_if.h"
//#include "COMMON/mac_rrc_primitives.h"
#include "NR_SIB1.h"
#include "NR_RRCReconfigurationComplete.h"
#include "NR_RRCReconfiguration.h"
...
...
@@ -57,11 +55,7 @@
#include "NR_PLMN-IdentityInfo.h"
#include "NR_MCC-MNC-Digit.h"
#include "NR_NG-5G-S-TMSI.h"
//#include "MCCH-Message.h"
//#include "MBSFNAreaConfiguration-r9.h"
//#include "SCellToAddMod-r10.h"
//#include "AS-Config.h"
//#include "AS-Context.h"
#include "NR_UE-NR-Capability.h"
#include "NR_UE-MRDC-Capability.h"
#include "NR_MeasResults.h"
...
...
openair2/RRC/NR/nr_rrc_extern.h
View file @
9fe2c0bd
...
...
@@ -32,9 +32,7 @@
#define __OPENAIR_NR_RRC_EXTERN_H__
#include "nr_rrc_defs.h"
#include "COMMON/mac_rrc_primitives.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/RLC/rlc.h"
#include "openair2/RRC/LTE/rrc_defs.h"
#include "openair2/RRC/common.h"
#define NR_MAX_SIB_LENGTH 2976 // 3GPP TS 38.331 section 5.2.1 - The physical layer imposes a limit to the maximum size a SIB can take. The maximum SIB1 or SI message size is 2976 bits.
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
9fe2c0bd
...
...
@@ -60,8 +60,6 @@
#include "NR_CellGroupConfig.h"
#include "NR_MeasResults.h"
#include "LTE_UECapabilityInformation.h"
#include "LTE_UL-DCCH-Message.h"
#include "NR_UL-CCCH-Message.h"
#include "NR_RRCSetupRequest-IEs.h"
#include "NR_RRCSetupComplete-IEs.h"
...
...
@@ -69,7 +67,6 @@
#include "NR_MIB.h"
#include "rlc.h"
#include "rrc_eNB_UE_context.h"
#include "platform_types.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
...
...
@@ -82,7 +79,6 @@
#include "UTIL/OSA/osa_defs.h"
#include "rrc_eNB_S1AP.h"
#include "rrc_gNB_NGAP.h"
#include "rrc_gNB_GTPV1U.h"
...
...
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