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
5823e184
Commit
5823e184
authored
Sep 21, 2020
by
kn.raju
Committed by
p.shashikala
Jan 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Multi-user RACH
parent
228be922
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
272 additions
and
179 deletions
+272
-179
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
+3
-1
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+20
-5
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+171
-126
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+2
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+0
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+47
-34
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+13
-4
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+14
-5
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+2
-2
No files found.
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
View file @
5823e184
...
...
@@ -619,8 +619,10 @@ typedef struct {
uint16_t
prgSize
;
/// Number of STD ant ports (parallel streams) feeding into the digBF Value: 0->255
uint8_t
digBFInterfaces
;
// Depends on numPRGs
uint16_t
PMIdx
[
275
];
uint16_t
*
beamIdx
[
275
];
// Depends on digBFInterfaces
uint16_t
beamIdx
[
256
];
}
nfapi_nr_tx_precoding_and_beamforming_t
;
//table 3-37
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
5823e184
...
...
@@ -405,10 +405,18 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
UE_info
->
UE_sched_ctrl
[
UE_id
].
active_ubwp
=
ubwpList
->
list
.
array
[
bwp_id
-
1
];
LOG_I
(
PHY
,
"Added new UE_id %d/%x with initial secondaryCellGroup
\n
"
,
UE_id
,
rnti
);
}
else
if
(
add_ue
==
1
&&
!
get_softmodem_params
()
->
phy_test
)
{
/* TODO: should check for free RA process */
const
int
CC_id
=
0
;
NR_RA_t
*
ra
=
&
RC
.
nrmac
[
Mod_idP
]
->
common_channels
[
CC_id
].
ra
[
0
];
ra
->
state
=
RA_IDLE
;
NR_COMMON_channels_t
*
cc
=
&
RC
.
nrmac
[
Mod_idP
]
->
common_channels
[
CC_id
];
uint8_t
ra_index
=
0
;
/* checking for free RA process */
for
(;
ra_index
<
NR_NB_RA_PROC_MAX
;
ra_index
++
)
{
if
((
cc
->
ra
[
ra_index
].
state
==
RA_IDLE
)
&&
(
!
cc
->
ra
[
ra_index
].
cfra
))
break
;
}
if
(
ra_index
==
NR_NB_RA_PROC_MAX
)
{
LOG_E
(
MAC
,
"%s() %s:%d RA processes are not available for CFRA RNTI :%x
\n
"
,
__FUNCTION__
,
__FILE__
,
__LINE__
,
rnti
);
return
-
1
;
}
NR_RA_t
*
ra
=
&
cc
->
ra
[
ra_index
];
ra
->
secondaryCellGroup
=
secondaryCellGroup
;
if
(
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
!=
NULL
)
{
if
(
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
!=
NULL
)
{
...
...
@@ -418,8 +426,15 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
uint8_t
num_preamble
=
cfra
.
resources
.
choice
.
ssb
->
ssb_ResourceList
.
list
.
count
;
ra
->
preambles
.
num_preambles
=
num_preamble
;
ra
->
preambles
.
preamble_list
=
(
uint8_t
*
)
malloc
(
num_preamble
*
sizeof
(
uint8_t
));
for
(
int
i
=
0
;
i
<
num_preamble
;
i
++
)
ra
->
preambles
.
preamble_list
[
i
]
=
cfra
.
resources
.
choice
.
ssb
->
ssb_ResourceList
.
list
.
array
[
i
]
->
ra_PreambleIndex
;
for
(
int
i
=
0
;
i
<
cc
->
num_active_ssb
;
i
++
)
{
for
(
int
j
=
0
;
j
<
num_preamble
;
j
++
)
{
if
(
cc
->
ssb_index
[
i
]
==
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
resources
.
choice
.
ssb
->
ssb_ResourceList
.
list
.
array
[
i
]
->
ssb
)
{
//one dedicated preamble for each beam
ra
->
preambles
.
preamble_list
[
i
]
=
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
resources
.
choice
.
ssb
->
ssb_ResourceList
.
list
.
array
[
i
]
->
ra_PreambleIndex
;
break
;
}
}
}
}
}
LOG_I
(
PHY
,
"Added new RA process for UE RNTI %04x with initial secondaryCellGroup
\n
"
,
rnti
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
5823e184
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
5823e184
...
...
@@ -620,7 +620,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
nrOfSymbols
,
current_harq_pid
,
harq
->
ndi
,
harq
->
round
);
harq
->
round
,
UE_info
->
UE_beam_index
[
UE_id
]);
NR_UE_ret_info_t
*
retInfo
=
&
sched_ctrl
->
retInfo
[
current_harq_pid
];
if
(
harq
->
round
!=
0
)
{
/* retransmission */
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
5823e184
...
...
@@ -245,7 +245,6 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
TX_req
->
PDU_index
=
nr_mac
->
pdu_index
[
CC_id
]
++
;
TX_req
->
num_TLV
=
1
;
TX_req
->
TLVs
[
0
].
length
=
8
;
memcpy
((
void
*
)
&
TX_req
->
TLVs
[
0
].
value
.
direct
[
0
],(
void
*
)
&
cc
[
CC_id
].
RAR_pdu
.
payload
[
0
],
TX_req
->
TLVs
[
0
].
length
);
nr_mac
->
TX_req
[
CC_id
].
Number_of_PDUs
++
;
nr_mac
->
TX_req
[
CC_id
].
SFN
=
frameP
;
nr_mac
->
TX_req
[
CC_id
].
Slot
=
slotP
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
5823e184
...
...
@@ -171,9 +171,6 @@ int allocate_nr_CCEs(gNB_MAC_INST *nr_mac,
uint16_t
Y
,
int
m
,
int
nr_of_candidates
)
{
// uncomment these when we allocate for common search space
// NR_COMMON_channels_t *cc = nr_mac->common_channels;
// NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
int
coreset_id
=
coreset
->
controlResourceSetId
;
int
*
cce_list
=
nr_mac
->
cce_list
[
bwp
->
bwp_Id
][
coreset_id
];
...
...
@@ -496,6 +493,37 @@ void nr_configure_css_dci_initial(nfapi_nr_dl_tti_pdcch_pdu_rel15_t* pdcch_pdu,
}
void
nr_configure_dci
(
gNB_MAC_INST
*
nr_mac
,
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu
,
uint16_t
rnti
,
NR_SearchSpace_t
*
ss
,
NR_ControlResourceSet_t
*
coreset
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_Downlink_t
*
bwp
,
uint8_t
beam_index
,
uint8_t
aggregation_level
,
int
CCEIndex
)
{
pdcch_pdu
->
dci_pdu
.
RNTI
[
pdcch_pdu
->
numDlDci
]
=
rnti
;
if
(
coreset
->
pdcch_DMRS_ScramblingID
!=
NULL
&&
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_ue_Specific
)
{
pdcch_pdu
->
dci_pdu
.
ScramblingId
[
pdcch_pdu
->
numDlDci
]
=
*
coreset
->
pdcch_DMRS_ScramblingID
;
pdcch_pdu
->
dci_pdu
.
ScramblingRNTI
[
pdcch_pdu
->
numDlDci
]
=
rnti
;
}
else
{
pdcch_pdu
->
dci_pdu
.
ScramblingId
[
pdcch_pdu
->
numDlDci
]
=
*
scc
->
physCellId
;
pdcch_pdu
->
dci_pdu
.
ScramblingRNTI
[
pdcch_pdu
->
numDlDci
]
=
0
;
}
pdcch_pdu
->
dci_pdu
.
AggregationLevel
[
pdcch_pdu
->
numDlDci
]
=
aggregation_level
;
pdcch_pdu
->
dci_pdu
.
CceIndex
[
pdcch_pdu
->
numDlDci
]
=
CCEIndex
;
if
(
ss
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
==
NR_SearchSpace__searchSpaceType__ue_Specific__dci_Formats_formats0_0_And_1_0
)
pdcch_pdu
->
dci_pdu
.
beta_PDCCH_1_0
[
pdcch_pdu
->
numDlDci
]
=
0
;
pdcch_pdu
->
dci_pdu
.
powerControlOffsetSS
[
pdcch_pdu
->
numDlDci
]
=
1
;
}
void
nr_fill_nfapi_dl_pdu
(
int
Mod_idP
,
nfapi_nr_dl_tti_request_body_t
*
dl_req
,
rnti_t
rnti
,
...
...
@@ -510,7 +538,8 @@ void nr_fill_nfapi_dl_pdu(int Mod_idP,
int
NrOfSymbols
,
int
harq_pid
,
int
ndi
,
int
round
)
{
int
round
,
int
UE_beam_index
)
{
gNB_MAC_INST
*
nr_mac
=
RC
.
nrmac
[
Mod_idP
];
NR_COMMON_channels_t
*
cc
=
nr_mac
->
common_channels
;
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
...
...
@@ -657,14 +686,22 @@ void nr_fill_nfapi_dl_pdu(int Mod_idP,
nr_configure_pdcch
(
nr_mac
,
pdcch_pdu_rel15
,
rnti
,
sched_ctrl
->
search_space
,
sched_ctrl
->
coreset
,
scc
,
bwp
,
sched_ctrl
->
aggregation_level
,
sched_ctrl
->
cce_index
);
bwp
);
nr_configure_dci
(
nr_mac
,
pdcch_pdu_rel15
,
rnti
,
sched_ctrl
->
search_space
,
sched_ctrl
->
coreset
,
scc
,
bwp
,
UE_beam_index
,
sched_ctrl
->
aggregation_level
,
sched_ctrl
->
cce_index
);
pdcch_pdu_rel15
->
numDlDci
++
;
int
dci_formats
[
2
];
int
rnti_types
[
2
];
...
...
@@ -780,13 +817,10 @@ void config_uldci(NR_BWP_Uplink_t *ubwp,
void
nr_configure_pdcch
(
gNB_MAC_INST
*
nr_mac
,
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu
,
uint16_t
rnti
,
NR_SearchSpace_t
*
ss
,
NR_ControlResourceSet_t
*
coreset
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_Downlink_t
*
bwp
,
uint8_t
aggregation_level
,
int
CCEIndex
)
{
NR_BWP_Downlink_t
*
bwp
)
{
if
(
bwp
)
{
// This is not the InitialBWP
pdcch_pdu
->
BWPSize
=
NRRIV2BW
(
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
pdcch_pdu
->
BWPStart
=
NRRIV2PRBOFFSET
(
bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
...
...
@@ -837,27 +871,6 @@ void nr_configure_pdcch(gNB_MAC_INST *nr_mac,
//precoderGranularity
pdcch_pdu
->
precoderGranularity
=
coreset
->
precoderGranularity
;
pdcch_pdu
->
dci_pdu
.
RNTI
[
pdcch_pdu
->
numDlDci
]
=
rnti
;
if
(
coreset
->
pdcch_DMRS_ScramblingID
!=
NULL
&&
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_ue_Specific
)
{
pdcch_pdu
->
dci_pdu
.
ScramblingId
[
pdcch_pdu
->
numDlDci
]
=
*
coreset
->
pdcch_DMRS_ScramblingID
;
pdcch_pdu
->
dci_pdu
.
ScramblingRNTI
[
pdcch_pdu
->
numDlDci
]
=
rnti
;
}
else
{
pdcch_pdu
->
dci_pdu
.
ScramblingId
[
pdcch_pdu
->
numDlDci
]
=
*
scc
->
physCellId
;
pdcch_pdu
->
dci_pdu
.
ScramblingRNTI
[
pdcch_pdu
->
numDlDci
]
=
0
;
}
pdcch_pdu
->
dci_pdu
.
AggregationLevel
[
pdcch_pdu
->
numDlDci
]
=
aggregation_level
;
pdcch_pdu
->
dci_pdu
.
CceIndex
[
pdcch_pdu
->
numDlDci
]
=
CCEIndex
;
if
(
ss
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
==
NR_SearchSpace__searchSpaceType__ue_Specific__dci_Formats_formats0_0_And_1_0
)
pdcch_pdu
->
dci_pdu
.
beta_PDCCH_1_0
[
pdcch_pdu
->
numDlDci
]
=
0
;
pdcch_pdu
->
dci_pdu
.
powerControlOffsetSS
[
pdcch_pdu
->
numDlDci
]
=
1
;
pdcch_pdu
->
numDlDci
++
;
}
else
{
// this is for InitialBWP
AssertFatal
(
1
==
0
,
"Fill in InitialBWP PDCCH configuration
\n
"
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
5823e184
...
...
@@ -775,13 +775,22 @@ void nr_schedule_ulsch(module_id_t module_id,
nr_configure_pdcch
(
RC
.
nrmac
[
0
],
pdcch_pdu_rel15
,
rnti
,
sched_ctrl
->
search_space
,
sched_ctrl
->
coreset
,
scc
,
sched_ctrl
->
active_bwp
,
sched_ctrl
->
aggregation_level
,
sched_ctrl
->
cce_index
);
sched_ctrl
->
active_bwp
);
nr_configure_dci
(
RC
.
nrmac
[
0
],
pdcch_pdu_rel15
,
rnti
,
sched_ctrl
->
search_space
,
sched_ctrl
->
coreset
,
scc
,
sched_ctrl
->
active_bwp
,
UE_info
->
UE_beam_index
[
UE_id
],
sched_ctrl
->
aggregation_level
,
sched_ctrl
->
cce_index
);
pdcch_pdu_rel15
->
numDlDci
++
;
dci_pdu_rel15_t
dci_pdu_rel15
[
MAX_DCI_CORESET
];
memset
(
dci_pdu_rel15
,
0
,
sizeof
(
dci_pdu_rel15
));
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
5823e184
...
...
@@ -178,7 +178,8 @@ void nr_fill_nfapi_dl_pdu(int Mod_id,
int
NrOfSymbols
,
int
harq_pid
,
int
ndi
,
int
round
);
int
round
,
int
UE_beam_index
);
void
handle_nr_uci_pucch_0_1
(
module_id_t
mod_id
,
frame_t
frame
,
...
...
@@ -262,15 +263,23 @@ void find_search_space(int ss_type,
NR_BWP_Downlink_t
*
bwp
,
NR_SearchSpace_t
*
ss
);
void
nr_configure_dci
(
gNB_MAC_INST
*
nr_mac
,
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu
,
uint16_t
rnti
,
NR_SearchSpace_t
*
ss
,
NR_ControlResourceSet_t
*
coreset
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_Downlink_t
*
bwp
,
uint8_t
beam_index
,
uint8_t
aggregation_level
,
int
CCEIndex
);
void
nr_configure_pdcch
(
gNB_MAC_INST
*
nr_mac
,
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu
,
uint16_t
rnti
,
NR_SearchSpace_t
*
ss
,
NR_ControlResourceSet_t
*
coreset
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_Downlink_t
*
bwp
,
uint8_t
aggregation_level
,
int
CCEIndex
);
NR_BWP_Downlink_t
*
bwp
);
void
fill_dci_pdu_rel15
(
NR_ServingCellConfigCommon_t
*
scc
,
NR_CellGroupConfig_t
*
secondaryCellGroup
,
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
5823e184
...
...
@@ -182,8 +182,6 @@ typedef struct {
uint32_t
PCCH_alloc_pdu
;
/// Outgoing PCCH pdu for PHY
PCCH_PDU
PCCH_pdu
;
/// Outgoing RAR pdu for PHY
RAR_PDU
RAR_pdu
;
/// Template for RA computations
NR_RA_t
ra
[
NR_NB_RA_PROC_MAX
];
/// VRB map for common channels
...
...
@@ -203,6 +201,8 @@ typedef struct {
uint8_t
max_association_period
;
//SSB index
uint8_t
ssb_index
[
MAX_NUM_OF_SSB
];
//CB preambles for each SSB
uint8_t
cb_preambles_per_ssb
;
}
NR_COMMON_channels_t
;
...
...
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