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
wangjie
OpenXG-RAN
Commits
2723d095
Commit
2723d095
authored
Apr 27, 2020
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_RRC_harq_hacks' into NR_RRC_PDCP
parents
6b794037
46a7b6c7
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
272 additions
and
144 deletions
+272
-144
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+1
-1
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
+1
-1
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+7
-0
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+12
-0
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+48
-0
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+1
-1
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+13
-3
openair1/SCHED_NR/fapi_nr_l1.c
openair1/SCHED_NR/fapi_nr_l1.c
+1
-3
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+36
-0
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-1
openair2/COMMON/platform_constants.h
openair2/COMMON/platform_constants.h
+1
-0
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+1
-1
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+1
-0
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+139
-127
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+6
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+2
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+1
-2
No files found.
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
View file @
2723d095
...
...
@@ -60,7 +60,7 @@ typedef struct {
uint8_t
CoreSetType
;
uint8_t
precoder_granularity
;
uint16_t
pdcch_dmrs_scrambling_id
;
uint16_t
scrambling_rnti
;
uint8_t
tci_state_pdcch
;
uint8_t
tci_present_in_dci
;
}
fapi_nr_coreset_t
;
...
...
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
View file @
2723d095
...
...
@@ -1560,7 +1560,7 @@ typedef struct
uint16_t
sfn
;
uint16_t
slot
;
uint16_t
num_ucis
;
nfapi_nr_uci_t
uci_list
[
NFAPI_MAX_NUM_UCI_INDICATION
]
;
nfapi_nr_uci_t
*
uci_list
;
}
nfapi_nr_uci_indication_t
;
...
...
openair1/PHY/INIT/nr_init.c
View file @
2723d095
...
...
@@ -26,6 +26,7 @@
#include "PHY/INIT/phy_init.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/NR_TRANSPORT/nr_transport.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto_common.h"
/*#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
...
...
@@ -502,6 +503,12 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
LOG_I
(
PHY
,
"Initialise nr transport
\n
"
);
uint16_t
grid_size
=
cfg
->
carrier_config
.
dl_grid_size
[
fp
->
numerology_index
].
value
;
for
(
i
=
0
;
i
<
NUMBER_OF_NR_PUCCH_MAX
;
i
++
)
{
LOG_I
(
PHY
,
"Allocating Transport Channel Buffers for PUCCH %d/%d
\n
"
,
i
,
NUMBER_OF_NR_PUCCH_MAX
);
gNB
->
pucch
[
i
]
=
new_gNB_pucch
();
AssertFatal
(
gNB
->
pucch
[
i
]
!=
NULL
,
"Can't initialize pucch %d
\n
"
,
i
);
}
for
(
i
=
0
;
i
<
NUMBER_OF_NR_DLSCH_MAX
;
i
++
)
{
LOG_I
(
PHY
,
"Allocating Transport Channel Buffers for DLSCH %d/%d
\n
"
,
i
,
NUMBER_OF_NR_DLSCH_MAX
);
...
...
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
2723d095
...
...
@@ -205,6 +205,18 @@ uint32_t nr_get_code_rate_ul(uint8_t Imcs, uint8_t table_idx);
uint32_t
nr_get_code_rate_dl
(
uint8_t
Imcs
,
uint8_t
table_idx
);
NR_gNB_PUCCH_t
*
new_gNB_pucch
(
void
);
void
nr_fill_pucch
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
);
int
nr_find_pucch
(
uint16_t
rnti
,
int
frame
,
int
slot
,
PHY_VARS_gNB
*
gNB
);
void
nr_fill_prach
(
PHY_VARS_gNB
*
gNB
,
int
SFN
,
int
Slot
,
...
...
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
2723d095
...
...
@@ -19,6 +19,54 @@
//#define DEBUG_NR_PUCCH_RX 1
NR_gNB_PUCCH_t
*
new_gNB_pucch
(
void
){
NR_gNB_PUCCH_t
*
pucch
;
pucch
=
(
NR_gNB_PUCCH_t
*
)
malloc16
(
sizeof
(
NR_gNB_PUCCH_t
));
pucch
->
active
=
0
;
return
(
pucch
);
}
int
nr_find_pucch
(
uint16_t
rnti
,
int
frame
,
int
slot
,
PHY_VARS_gNB
*
gNB
)
{
AssertFatal
(
gNB
!=
NULL
,
"gNB is null
\n
"
);
int
index
=
-
1
;
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_ULSCH_MAX
;
i
++
)
{
AssertFatal
(
gNB
->
pucch
[
i
]
!=
NULL
,
"gNB->pucch[%d] is null
\n
"
,
i
);
if
((
gNB
->
pucch
[
i
]
->
active
>
0
)
&&
(
gNB
->
pucch
[
i
]
->
pucch_pdu
.
rnti
==
rnti
)
&&
(
gNB
->
pucch
[
i
]
->
frame
==
frame
)
&&
(
gNB
->
pucch
[
i
]
->
slot
==
slot
))
return
(
i
);
else
if
((
gNB
->
pucch
[
i
]
->
active
==
0
)
&&
(
index
==-
1
))
index
=
i
;
}
if
(
index
==-
1
)
LOG_E
(
MAC
,
"PUCCH list is full
\n
"
);
return
(
index
);
}
void
nr_fill_pucch
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
int
id
=
nr_find_pucch
(
pucch_pdu
->
rnti
,
frame
,
slot
,
gNB
);
AssertFatal
(
(
id
>=
0
)
&&
(
id
<
NUMBER_OF_NR_PUCCH_MAX
),
"invalid id found for pucch !!! rnti %04x id %d
\n
"
,
pucch_pdu
->
rnti
,
id
);
NR_gNB_PUCCH_t
*
pucch
=
gNB
->
pucch
[
id
];
pucch
->
frame
=
frame
;
pucch
->
slot
=
slot
;
pucch
->
active
=
1
;
memcpy
((
void
*
)
&
pucch
->
pucch_pdu
,
(
void
*
)
pucch_pdu
,
sizeof
(
nfapi_nr_pucch_pdu_t
));
}
int
get_pucch0_cs_lut_index
(
PHY_VARS_gNB
*
gNB
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
int
i
=
0
;
...
...
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
View file @
2723d095
...
...
@@ -851,7 +851,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
uint64_t
dci_estimation
[
2
]
=
{
0
};
const
t_nrPolar_params
*
currentPtrDCI
=
nr_polar_params
(
1
,
dci_length
,
L
,
1
,
&
ue
->
polarList
);
nr_pdcch_unscrambling
(
rel15
->
rnti
,
nr_pdcch_unscrambling
(
rel15
->
coreset
.
scrambling_
rnti
,
&
ue
->
frame_parms
,
slot
,
&
pdcch_vars
->
e_rx
[
CCEind
*
108
],
...
...
openair1/PHY/defs_gNB.h
View file @
2723d095
...
...
@@ -340,6 +340,15 @@ typedef struct {
uint16_t
cba_rnti
[
NUM_MAX_CBA_GROUP
];
}
NR_gNB_ULSCH_t
;
typedef
struct
{
uint8_t
active
;
/// Frame where current PUCCH pdu was sent
uint32_t
frame
;
/// Slot where current PUCCH pdu was sent
uint32_t
slot
;
/// ULSCH PDU
nfapi_nr_pucch_pdu_t
pucch_pdu
;
}
NR_gNB_PUCCH_t
;
typedef
struct
{
/// \brief Pointers (dynamic) to the received data in the time domain.
...
...
@@ -619,9 +628,9 @@ typedef struct {
#define MAX_NUM_NR_RX_RACH_PDUS 4
#define MAX_NUM_NR_RX_PRACH_PREAMBLES 4
#define MAX_UL_PDUS_PER_SLOT
100
#define MAX_NUM_NR_SRS_PDUS
100
#define MAX_NUM_NR_UCI_PDUS
100
#define MAX_UL_PDUS_PER_SLOT
8
#define MAX_NUM_NR_SRS_PDUS
8
#define MAX_NUM_NR_UCI_PDUS
8
/// Top-level PHY Data Structure for gNB
typedef
struct
PHY_VARS_gNB_s
{
...
...
@@ -675,6 +684,7 @@ typedef struct PHY_VARS_gNB_s {
NR_gNB_COMMON
common_vars
;
NR_gNB_PRACH
prach_vars
;
NR_gNB_PUSCH
*
pusch_vars
[
NUMBER_OF_NR_ULSCH_MAX
];
NR_gNB_PUCCH_t
*
pucch
[
NUMBER_OF_NR_PUCCH_MAX
];
NR_gNB_DLSCH_t
*
dlsch
[
NUMBER_OF_NR_DLSCH_MAX
][
2
];
// Nusers times two spatial streams
NR_gNB_ULSCH_t
*
ulsch
[
NUMBER_OF_NR_ULSCH_MAX
][
2
];
// [Nusers times][2 codewords]
NR_gNB_DLSCH_t
*
dlsch_SI
,
*
dlsch_ra
,
*
dlsch_p
;
...
...
openair1/SCHED_NR/fapi_nr_l1.c
View file @
2723d095
...
...
@@ -114,8 +114,6 @@ void handle_nfapi_nr_ul_dci_pdu(PHY_VARS_gNB *gNB,
nr_fill_ul_dci
(
gNB
,
frame
,
slot
);
}
void
handle_nr_nfapi_pdsch_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
...
...
@@ -211,7 +209,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
break
;
case
NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE
:
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PUCCH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
// handle_nfapi_nr_pucch_pdu(gNB,frame,slot,
UL_tti_req->pdus_list[i].pucch_pdu);
nr_fill_pucch
(
gNB
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
,
&
UL_tti_req
->
pdus_list
[
i
].
pucch_pdu
);
break
;
case
NFAPI_NR_UL_CONFIG_PRACH_PDU_TYPE
:
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PRACH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
2723d095
...
...
@@ -384,6 +384,42 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
LOG_D
(
PHY
,
"phy_procedures_gNB_uespec_RX frame %d, slot %d
\n
"
,
frame_rx
,
slot_rx
);
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_PUCCH_MAX
;
i
++
){
NR_gNB_PUCCH_t
*
pucch
=
gNB
->
pucch
[
i
];
if
(
pucch
)
{
if
((
pucch
->
active
==
1
)
&&
(
pucch
->
frame
==
frame_rx
)
&&
(
pucch
->
slot
==
slot_rx
)
)
{
nfapi_nr_pucch_pdu_t
*
pucch_pdu
=
&
pucch
[
i
].
pucch_pdu
;
uint16_t
num_ucis
;
switch
(
pucch_pdu
->
format_type
)
{
case
0
:
num_ucis
=
gNB
->
UL_INFO
.
uci_ind
.
num_ucis
;
gNB
->
UL_INFO
.
uci_ind
.
uci_list
=
&
gNB
->
uci_pdu_list
[
0
];
gNB
->
UL_INFO
.
uci_ind
.
sfn
=
frame_rx
;
gNB
->
UL_INFO
.
uci_ind
.
slot
=
slot_rx
;
gNB
->
uci_pdu_list
[
num_ucis
].
pdu_type
=
NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE
;
gNB
->
uci_pdu_list
[
num_ucis
].
pdu_size
=
sizeof
(
nfapi_nr_uci_pucch_pdu_format_0_1_t
);
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_pdu_format0
=
&
gNB
->
uci_pdu_list
[
num_ucis
].
pucch_pdu_format_0_1
;
nr_decode_pucch0
(
gNB
,
slot_rx
,
uci_pdu_format0
,
pucch_pdu
);
gNB
->
UL_INFO
.
uci_ind
.
num_ucis
+=
1
;
pucch
->
active
=
0
;
break
;
default:
AssertFatal
(
1
==
0
,
"Only PUCCH format 0 is currently supported
\n
"
);
}
}
}
}
for
(
int
ULSCH_id
=
0
;
ULSCH_id
<
NUMBER_OF_NR_ULSCH_MAX
;
ULSCH_id
++
)
{
NR_gNB_ULSCH_t
*
ulsch
=
gNB
->
ulsch
[
ULSCH_id
][
0
];
int
harq_pid
;
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
2723d095
...
...
@@ -703,8 +703,8 @@ int main(int argc, char **argv)
errors_bit
=
0
;
//multipath channel
//multipath_channel(gNB2UE,s_re,s_im,r_re,r_im,frame_length_complex_samples,0);
memset
(
RC
.
nrmac
[
0
]
->
cce_list
[
1
][
0
],
0
,
MAX_NUM_CCE
*
sizeof
(
int
));
memset
(
RC
.
nrmac
[
0
]
->
cce_list
[
1
][
1
],
0
,
MAX_NUM_CCE
*
sizeof
(
int
));
clear_nr_nfapi_information
(
RC
.
nrmac
[
0
],
0
,
frame
,
slot
);
if
(
css_flag
==
0
)
nr_schedule_uss_dlsch_phytest
(
0
,
frame
,
slot
,
&
pucch_sched
,
&
dlsch_config
);
else
nr_schedule_css_dlsch_phytest
(
0
,
frame
,
slot
);
...
...
openair2/COMMON/platform_constants.h
View file @
2723d095
...
...
@@ -99,6 +99,7 @@
#define NUMBER_OF_NR_DLSCH_MAX 2//16
#define NUMBER_OF_NR_ULSCH_MAX 2//16
#define NUMBER_OF_NR_PUCCH_MAX 2
#define NUMBER_OF_NR_SR_MAX 16
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
2723d095
...
...
@@ -349,11 +349,11 @@ int nr_rrc_mac_config_req_ue(
if
(
cell_group_config
!=
NULL
){
mac
->
servCellIndex
=
*
cell_group_config
->
spCellConfig
->
servCellIndex
;
if
(
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
)
{
mac
->
rach_ConfigDedicated
=
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
;
mac
->
scc
=
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
->
spCellConfigCommon
;
config_common_ue
(
mac
,
module_id
,
cc_idP
);
mac
->
crnti
=
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
;
LOG_I
(
MAC
,
"Configuring CRNTI %x
\n
"
,
mac
->
crnti
);
}
mac
->
scg
=
cell_group_config
;
...
...
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
2723d095
...
...
@@ -156,6 +156,7 @@ typedef struct {
NR_ServingCellConfigCommon_t
*
scc
;
NR_CellGroupConfig_t
*
scg
;
NR_RACH_ConfigDedicated_t
*
rach_ConfigDedicated
;
int
servCellIndex
;
//// MAC config
NR_DRX_Config_t
*
drx_Config
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
2723d095
...
...
@@ -88,6 +88,10 @@ void nr_get_prach_resources(module_id_t mod_id,
int
messagePowerOffsetGroupB
,
messageSizeGroupA
,
PLThreshold
,
sizeOfRA_PreamblesGroupA
,
numberOfRA_Preambles
,
i
,
deltaPreamble_Msg3
;
uint8_t
noGroupB
=
0
,
s_id
,
f_id
,
ul_carrier_id
,
prach_ConfigIndex
,
SFN_nbr
,
Msg3_size
;
AssertFatal
(
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
!=
NULL
,
"[UE %d] FATAL nr_rach_ConfigCommon is NULL !!!
\n
"
,
mod_id
);
nr_rach_ConfigCommon
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
;
rach_ConfigGeneric
=
&
nr_rach_ConfigCommon
->
rach_ConfigGeneric
;
// NR_RSRP_Range_t rsrp_ThresholdSSB; // todo
///////////////////////////////////////////////////////////
...
...
@@ -104,13 +108,18 @@ void nr_get_prach_resources(module_id_t mod_id,
// -- RA initiated for SI request:
// --- SSB selection, set prach_resources->ra_PreambleIndex
// if (rach_ConfigDedicated) { // This is for network controlled Mobility
// // operation for contention-free RA resources when:
// // - available SSB with SS-RSRP above rsrp-ThresholdSSB: SSB selection
// // - availalbe CSI-RS with CSI-RSRP above rsrp-ThresholdCSI-RS: CSI-RS selection
// prach_resources->ra_PreambleIndex = rach_ConfigDedicated->ra_PreambleIndex;
// }
if
(
rach_ConfigDedicated
)
{
//////////* Contention free RA *//////////
// - the PRACH preamble for the UE to transmit is set through RRC configuration
// - this is the default mode in current implementation!
// Operation for contention-free RA resources when:
// - available SSB with SS-RSRP above rsrp-ThresholdSSB: SSB selection
// - available CSI-RS with CSI-RSRP above rsrp-ThresholdCSI-RS: CSI-RS selection
// - network controlled Mobility
uint8_t
cfra_ssb_resource_idx
=
0
;
prach_resources
->
ra_PreambleIndex
=
rach_ConfigDedicated
->
cfra
->
resources
.
choice
.
ssb
->
ssb_ResourceList
.
list
.
array
[
cfra_ssb_resource_idx
]
->
ra_PreambleIndex
;
LOG_D
(
MAC
,
"[RAPROC] - Selected RA preamble index %d for contention-free random access procedure...
\n
"
,
prach_resources
->
ra_PreambleIndex
);
}
else
{
//////////* Contention-based RA preamble selection *//////////
// todo:
// - selection of SSB with SS-RSRP above rsrp-ThresholdSSB else select any SSB
...
...
@@ -118,11 +127,6 @@ void nr_get_prach_resources(module_id_t mod_id,
// rsrp_ThresholdSSB = *nr_rach_ConfigCommon->rsrp_ThresholdSSB;
AssertFatal
(
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
!=
NULL
,
"[UE %d] FATAL nr_rach_ConfigCommon is NULL !!!
\n
"
,
mod_id
);
nr_rach_ConfigCommon
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
;
rach_ConfigGeneric
=
&
nr_rach_ConfigCommon
->
rach_ConfigGeneric
;
Msg3_size
=
mac
->
RA_Msg3_size
;
numberOfRA_Preambles
=
64
;
...
...
@@ -237,6 +241,8 @@ void nr_get_prach_resources(module_id_t mod_id,
prach_resources
->
ra_PreambleIndex
=
sizeOfRA_PreamblesGroupA
+
(
taus
())
%
(
numberOfRA_Preambles
-
sizeOfRA_PreamblesGroupA
);
}
}
LOG_D
(
MAC
,
"[RAPROC] - Selected RA preamble index %d for contention-based random access procedure...
\n
"
,
prach_resources
->
ra_PreambleIndex
);
}
// todo determine next available PRACH occasion
// - if RA initiated for SI request and ra_AssociationPeriodIndex and si-RequestPeriod are configured
...
...
@@ -284,7 +290,7 @@ void nr_get_prach_resources(module_id_t mod_id,
prach_resources
->
ra_RNTI
=
1
+
s_id
+
14
*
t_id
+
1120
*
f_id
+
8960
*
ul_carrier_id
;
mac
->
ra_rnti
=
prach_resources
->
ra_RNTI
;
LOG_D
(
MAC
,
"Computed ra_RNTI is %
d
"
,
prach_resources
->
ra_RNTI
);
LOG_D
(
MAC
,
"Computed ra_RNTI is %
x
\n
"
,
prach_resources
->
ra_RNTI
);
}
// TbD: RA_attempt_number not used
...
...
@@ -311,6 +317,7 @@ void nr_Msg3_transmitted(module_id_t mod_id, uint8_t CC_id, frame_t frameP, uint
/// Handling inizialization by PDCCH order, MAC entity or RRC (TS 38.300)
/// Only one RA procedure is ongoing at any point in time in a MAC entity
/// the RA procedure on a SCell shall only be initiated by PDCCH order
/// in the current implementation, RA is contention free only
// WIP
// todo TS 38.321:
...
...
@@ -324,7 +331,6 @@ void nr_Msg3_transmitted(module_id_t mod_id, uint8_t CC_id, frame_t frameP, uint
// - retrieve TBS
// - add mac_rrc_nr_data_req_ue, etc ...
// - add the backoff condition here if we have it from a previous RA reponse which failed (i.e. backoff indicator)
void
nr_ue_get_rach
(
NR_PRACH_RESOURCES_t
*
prach_resources
,
module_id_t
mod_id
,
int
CC_id
,
...
...
@@ -345,6 +351,8 @@ void nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
NR_RACH_ConfigCommon_t
*
setup
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
;
NR_RACH_ConfigGeneric_t
*
rach_ConfigGeneric
=
&
setup
->
rach_ConfigGeneric
;
NR_FrequencyInfoDL_t
*
frequencyInfoDL
=
scc
->
downlinkConfigCommon
->
frequencyInfoDL
;
NR_RACH_ConfigDedicated_t
*
rach_ConfigDedicated
=
mac
->
rach_ConfigDedicated
;
// int32_t frame_diff = 0;
uint8_t
sdu_lcids
[
NB_RB_MAX
]
=
{
0
};
...
...
@@ -485,7 +493,8 @@ void nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
}
// Fill in preamble and PRACH resources
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
nr_tti_tx
,
1
,
prach_resources
,
NULL
);
if
(
is_nr_prach_slot
)
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
nr_tti_tx
,
1
,
prach_resources
,
rach_ConfigDedicated
);
offset
=
nr_generate_ulsch_pdu
((
uint8_t
*
)
mac_sdus
,
// sdus buffer
(
uint8_t
*
)
payload
,
// UL MAC pdu pointer
...
...
@@ -601,8 +610,11 @@ void nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
mac
->
RA_tx_frame
=
frame
;
mac
->
RA_tx_subframe
=
nr_tti_tx
;
// Fill in preamble and PRACH resources
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
nr_tti_tx
,
0
,
prach_resources
,
NULL
);
if
(
is_nr_prach_slot
)
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
nr_tti_tx
,
0
,
prach_resources
,
rach_ConfigDedicated
);
}
}
}
else
if
(
UE_mode
==
PUSCH
)
{
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
View file @
2723d095
...
...
@@ -170,10 +170,14 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac,fapi_nr_dl_config_request_t *dl_
}
rel15
->
coreset
.
CoreSetType
=
1
;
rel15
->
coreset
.
precoder_granularity
=
mac
->
coreset
[
0
][
0
]
->
precoderGranularity
;
if
(
mac
->
coreset
[
0
][
0
]
->
pdcch_DMRS_ScramblingID
)
if
(
mac
->
coreset
[
0
][
0
]
->
pdcch_DMRS_ScramblingID
)
{
rel15
->
coreset
.
pdcch_dmrs_scrambling_id
=
*
mac
->
coreset
[
0
][
0
]
->
pdcch_DMRS_ScramblingID
;
else
rel15
->
coreset
.
scrambling_rnti
=
mac
->
t_crnti
;
}
else
{
rel15
->
coreset
.
pdcch_dmrs_scrambling_id
=
*
mac
->
scc
->
physCellId
;
rel15
->
coreset
.
scrambling_rnti
=
0
;
}
fill_dci_search_candidates
(
mac
->
SSpace
[
0
][
0
][
ss_id
],
rel15
);
rel15
->
dci_format
=
NR_DL_DCI_FORMAT_1_1
;
rel15
->
dci_length
=
nr_dci_size
(
mac
->
scg
,
def_dci_pdu_rel15
,
rel15
->
dci_format
,
NR_RNTI_C
,
rel15
->
BWPSize
,
bwp_id
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
2723d095
...
...
@@ -426,9 +426,9 @@ int configure_fapi_dl_pdu(int Mod_idP,
int
rnti_types
[
2
];
if
(
ss
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
)
dci_formats
[
0
]
=
NR_DL_DCI_FORMAT_1_0
;
else
dci_formats
[
0
]
=
NR_DL_DCI_FORMAT_1_1
;
else
dci_formats
[
0
]
=
NR_DL_DCI_FORMAT_1_0
;
rnti_types
[
0
]
=
NR_RNTI_C
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
2723d095
...
...
@@ -452,7 +452,6 @@ int nr_configure_pdcch(gNB_MAC_INST *nr_mac,
pdcch_pdu
->
SubcarrierSpacing
=
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
;
pdcch_pdu
->
CyclicPrefix
=
(
bwp
->
bwp_Common
->
genericParameters
.
cyclicPrefix
==
NULL
)
?
0
:
*
bwp
->
bwp_Common
->
genericParameters
.
cyclicPrefix
;
// first symbol
//AssertFatal(pdcch_scs==kHz15, "PDCCH SCS above 15kHz not allowed if a symbol above 2 is monitored");
int
sps
=
bwp
->
bwp_Common
->
genericParameters
.
cyclicPrefix
==
NULL
?
14
:
12
;
...
...
@@ -807,7 +806,7 @@ void fill_dci_pdu_rel15(NR_CellGroupConfig_t *secondaryCellGroup,
for
(
int
d
=
0
;
d
<
pdcch_pdu_rel15
->
numDlDci
;
d
++
)
{
uint64_t
*
dci_pdu
=
(
uint64_t
*
)
pdcch_pdu_rel15
->
dci_pdu
.
Payload
[
d
];
int
dci_size
=
nr_dci_size
(
secondaryCellGroup
,
&
dci_pdu_rel15
[
d
],
dci_formats
[
d
],
rnti_types
[
d
],
pdcch_pdu_rel15
->
BWPSize
,
bwp_id
);
int
dci_size
=
nr_dci_size
(
secondaryCellGroup
,
&
dci_pdu_rel15
[
d
],
dci_formats
[
d
],
rnti_types
[
d
],
N_RB
,
bwp_id
);
pdcch_pdu_rel15
->
dci_pdu
.
PayloadSizeBits
[
d
]
=
dci_size
;
AssertFatal
(
pdcch_pdu_rel15
->
dci_pdu
.
PayloadSizeBits
[
d
]
<=
64
,
"DCI sizes above 64 bits not yet supported"
);
...
...
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