Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
f496a08a
Commit
f496a08a
authored
Nov 13, 2020
by
kn.raju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes in vrb_map for multi-rach and resolved indentation
parent
d3de1feb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
31 deletions
+29
-31
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+23
-25
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+2
-2
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+2
-2
No files found.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
f496a08a
...
@@ -376,7 +376,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
...
@@ -376,7 +376,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
uint8_t
ra_index
=
0
;
uint8_t
ra_index
=
0
;
/* checking for free RA process */
/* checking for free RA process */
for
(;
ra_index
<
NR_NB_RA_PROC_MAX
;
ra_index
++
)
{
for
(;
ra_index
<
NR_NB_RA_PROC_MAX
;
ra_index
++
)
{
if
(
cc
->
ra
[
ra_index
].
state
==
RA_IDLE
)
break
;
if
(
cc
->
ra
[
ra_index
].
state
==
RA_IDLE
)
break
;
}
}
NR_RA_t
*
ra
=
&
cc
->
ra
[
ra_index
];
NR_RA_t
*
ra
=
&
cc
->
ra
[
ra_index
];
ra
->
secondaryCellGroup
=
secondaryCellGroup
;
ra
->
secondaryCellGroup
=
secondaryCellGroup
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
f496a08a
...
@@ -449,6 +449,9 @@ void nr_initiate_ra_proc(module_id_t module_idP,
...
@@ -449,6 +449,9 @@ void nr_initiate_ra_proc(module_id_t module_idP,
preamble_index
,
preamble_index
,
freq_index
,
freq_index
,
symbol
);
symbol
);
// the UE sent a RACH either for starting RA procedure or RA procedure failed and UE retries
if
(
ra
->
cfra
)
{
int
pr_found
=
0
;
int
pr_found
=
0
;
if
(
preamble_index
==
ra
->
preambles
.
preamble_list
[
beam_index
])
{
if
(
preamble_index
==
ra
->
preambles
.
preamble_list
[
beam_index
])
{
pr_found
=
1
;
pr_found
=
1
;
...
@@ -458,7 +461,7 @@ void nr_initiate_ra_proc(module_id_t module_idP,
...
@@ -458,7 +461,7 @@ void nr_initiate_ra_proc(module_id_t module_idP,
module_idP
,
preamble_index
);
module_idP
,
preamble_index
);
return
;
// if the PRACH preamble does not correspond to any of the ones sent through RRC abort RA proc
return
;
// if the PRACH preamble does not correspond to any of the ones sent through RRC abort RA proc
}
}
}
int
loop
=
0
;
int
loop
=
0
;
LOG_D
(
MAC
,
"Frame %d, Slot %d: Activating RA process
\n
"
,
frameP
,
slotP
);
LOG_D
(
MAC
,
"Frame %d, Slot %d: Activating RA process
\n
"
,
frameP
,
slotP
);
ra
->
state
=
Msg2
;
ra
->
state
=
Msg2
;
...
@@ -622,7 +625,7 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t
...
@@ -622,7 +625,7 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t
AssertFatal
(
ra
->
secondaryCellGroup
,
AssertFatal
(
ra
->
secondaryCellGroup
,
"no secondaryCellGroup for RNTI %04x
\n
"
,
"no secondaryCellGroup for RNTI %04x
\n
"
,
ra
->
c
rnti
);
ra
->
rnti
);
AssertFatal
(
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
==
1
,
AssertFatal
(
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
==
1
,
"downlinkBWP_ToAddModList has %d BWP!
\n
"
,
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
);
"downlinkBWP_ToAddModList has %d BWP!
\n
"
,
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
);
NR_BWP_Uplink_t
*
ubwp
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
];
NR_BWP_Uplink_t
*
ubwp
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
];
...
@@ -730,23 +733,15 @@ void nr_generate_Msg2(module_id_t module_idP,
...
@@ -730,23 +733,15 @@ void nr_generate_Msg2(module_id_t module_idP,
int
dci10_bw
=
0
;
int
dci10_bw
=
0
;
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu_rel15
=
&
dl_tti_pdcch_pdu
->
pdcch_pdu
.
pdcch_pdu_rel15
;
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu_rel15
=
&
dl_tti_pdcch_pdu
->
pdcch_pdu
.
pdcch_pdu_rel15
;
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
#if 0
// This code from this point on will not work on initialBWP or CORESET0
// This code from this point on will not work on initialBWP or CORESET0
AssertFatal
(
ra
->
bwp_id
>
0
,
"cannot work on initialBWP for now
\n
"
);
AssertFatal(ra->bwp_id>0,"cannot work on initialBWP for now\n");
AssertFatal
(
ra
->
secondaryCellGroup
,
NR_CellGroupConfig_t *secondaryCellGroup = UE_list->secondaryCellGroup[UE_id];
AssertFatal(secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count == 1,
"downlinkBWP_ToAddModList has %d BWP!\n", secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count);
NR_BWP_Downlink_t *bwp = secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[ra->bwp_id - 1];
NR_BWP_Uplink_t *ubwp=secondaryCellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[ra->bwp_id-1];
#endif
AssertFatal
(
ra
->
secondaryCellGroup
,
"no secondaryCellGroup for RNTI %04x
\n
"
,
"no secondaryCellGroup for RNTI %04x
\n
"
,
ra
->
c
rnti
);
ra
->
rnti
);
AssertFatal
(
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
==
1
,
AssertFatal
(
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
==
1
,
"downlinkBWP_ToAddModList has %d BWP!
\n
"
,
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
);
"downlinkBWP_ToAddModList has %d BWP!
\n
"
,
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
);
NR_BWP_Downlink_t
*
bwp
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
];
NR_BWP_Downlink_t
*
bwp
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
];
NR_BWP_Uplink_t
*
ubwp
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
];
NR_BWP_Uplink_t
*
ubwp
=
ra
->
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
];
uint8_t
nr_of_candidates
,
aggregation_level
;
uint8_t
nr_of_candidates
,
aggregation_level
;
find_aggregation_candidates
(
&
aggregation_level
,
&
nr_of_candidates
,
ss
);
find_aggregation_candidates
(
&
aggregation_level
,
&
nr_of_candidates
,
ss
);
NR_ControlResourceSet_t
*
coreset
=
get_coreset
(
bwp
,
ss
,
0
/* common */
);
NR_ControlResourceSet_t
*
coreset
=
get_coreset
(
bwp
,
ss
,
0
/* common */
);
...
@@ -777,6 +772,11 @@ void nr_generate_Msg2(module_id_t module_idP,
...
@@ -777,6 +772,11 @@ void nr_generate_Msg2(module_id_t module_idP,
locationAndBandwidth
=
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
;
locationAndBandwidth
=
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
;
dci10_bw
=
NRRIV2BW
(
locationAndBandwidth
,
275
);
dci10_bw
=
NRRIV2BW
(
locationAndBandwidth
,
275
);
}
}
uint16_t
*
vrb_map
=
cc
[
CC_id
].
vrb_map
;
int
rbStart
=
NRRIV2PRBOFFSET
(
locationAndBandwidth
,
275
);
while
(
rbStart
<
dci10_bw
&&
vrb_map
[
rbStart
])
rbStart
++
;
LOG_I
(
MAC
,
"[RAPROC] Scheduling common search space DCI type 1 dlBWP BW %d
\n
"
,
dci10_bw
);
LOG_I
(
MAC
,
"[RAPROC] Scheduling common search space DCI type 1 dlBWP BW %d
\n
"
,
dci10_bw
);
if
((
ra
->
Msg2_frame
==
frameP
)
&&
(
ra
->
Msg2_slot
==
slotP
))
{
if
((
ra
->
Msg2_frame
==
frameP
)
&&
(
ra
->
Msg2_slot
==
slotP
))
{
...
@@ -834,7 +834,7 @@ void nr_generate_Msg2(module_id_t module_idP,
...
@@ -834,7 +834,7 @@ void nr_generate_Msg2(module_id_t module_idP,
pdsch_pdu_rel15
->
numDmrsCdmGrpsNoData
=
2
;
pdsch_pdu_rel15
->
numDmrsCdmGrpsNoData
=
2
;
pdsch_pdu_rel15
->
dmrsPorts
=
1
;
pdsch_pdu_rel15
->
dmrsPorts
=
1
;
pdsch_pdu_rel15
->
resourceAlloc
=
1
;
pdsch_pdu_rel15
->
resourceAlloc
=
1
;
pdsch_pdu_rel15
->
rbStart
=
0
;
pdsch_pdu_rel15
->
rbStart
=
rbStart
;
//
0;
pdsch_pdu_rel15
->
rbSize
=
6
;
pdsch_pdu_rel15
->
rbSize
=
6
;
pdsch_pdu_rel15
->
VRBtoPRBMapping
=
0
;
// non interleaved
pdsch_pdu_rel15
->
VRBtoPRBMapping
=
0
;
// non interleaved
...
@@ -882,7 +882,6 @@ void nr_generate_Msg2(module_id_t module_idP,
...
@@ -882,7 +882,6 @@ void nr_generate_Msg2(module_id_t module_idP,
aggregation_level
,
aggregation_level
,
CCEIndex
);
CCEIndex
);
// dci_pdu_rel15_t dci_pdu_rel15;
dci_pdu_rel15
[
pdcch_pdu_rel15
->
numDlDci
].
frequency_domain_assignment
.
val
=
PRBalloc_to_locationandbandwidth0
(
pdsch_pdu_rel15
->
rbSize
,
dci_pdu_rel15
[
pdcch_pdu_rel15
->
numDlDci
].
frequency_domain_assignment
.
val
=
PRBalloc_to_locationandbandwidth0
(
pdsch_pdu_rel15
->
rbSize
,
pdsch_pdu_rel15
->
rbStart
,
dci10_bw
);
pdsch_pdu_rel15
->
rbStart
,
dci10_bw
);
dci_pdu_rel15
[
pdcch_pdu_rel15
->
numDlDci
].
time_domain_assignment
.
val
=
time_domain_assignment
;
dci_pdu_rel15
[
pdcch_pdu_rel15
->
numDlDci
].
time_domain_assignment
.
val
=
time_domain_assignment
;
...
@@ -937,15 +936,14 @@ void nr_generate_Msg2(module_id_t module_idP,
...
@@ -937,15 +936,14 @@ void nr_generate_Msg2(module_id_t module_idP,
T_INT
(
RA_rnti
),
T_INT
(
frameP
),
T_INT
(
slotP
),
T_INT
(
0
)
/* harq pid, meaningful? */
,
T_INT
(
RA_rnti
),
T_INT
(
frameP
),
T_INT
(
slotP
),
T_INT
(
0
)
/* harq pid, meaningful? */
,
T_BUFFER
(
&
cc
[
CC_id
].
RAR_pdu
[
dci_pdu_index
].
payload
[
0
],
tx_req
->
TLVs
[
0
].
length
));
T_BUFFER
(
&
cc
[
CC_id
].
RAR_pdu
[
dci_pdu_index
].
payload
[
0
],
tx_req
->
TLVs
[
0
].
length
));
/* mark the corresponding RBs as used */
/* mark the corresponding RBs as used */
uint16_t
*
vrb_map
=
cc
[
CC_id
].
vrb_map
;
for
(
int
rb
=
0
;
rb
<
pdsch_pdu_rel15
->
rbSize
;
rb
++
)
for
(
int
rb
=
0
;
rb
<
pdsch_pdu_rel15
->
rbSize
;
rb
++
)
vrb_map
[
rb
+
pdsch_pdu_rel15
->
rbStart
]
=
1
;
vrb_map
[
rb
+
pdsch_pdu_rel15
->
rbStart
]
=
1
;
dci_pdu_index
+=
1
;
dci_pdu_index
+=
1
;
dl_req
->
nPDUs
+=
1
;
//Adding PDSCH pdu count
dl_req
->
nPDUs
+=
1
;
//Adding PDSCH pdu count
pdcch_pdu_rel15
->
numDlDci
++
;
pdcch_pdu_rel15
->
numDlDci
++
;
}
}
}
}
}
}
fill_dci_pdu_rel15
(
scc
,
ra
->
secondaryCellGroup
,
pdcch_pdu_rel15
,
dci_pdu_rel15
,
dci_formats
,
rnti_types
,
dci10_bw
,
ra
->
bwp_id
);
fill_dci_pdu_rel15
(
scc
,
ra
->
secondaryCellGroup
,
pdcch_pdu_rel15
,
dci_pdu_rel15
,
dci_formats
,
rnti_types
,
dci10_bw
,
ra
->
bwp_id
);
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
f496a08a
...
@@ -613,7 +613,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -613,7 +613,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
current_harq_pid
,
current_harq_pid
,
harq
->
ndi
,
harq
->
ndi
,
harq
->
round
,
harq
->
round
,
UE_info
->
UE_beam_index
[
UE_id
]);
UE_info
->
UE_beam_index
[
UE_id
]);
NR_UE_ret_info_t
*
retInfo
=
&
sched_ctrl
->
retInfo
[
current_harq_pid
];
NR_UE_ret_info_t
*
retInfo
=
&
sched_ctrl
->
retInfo
[
current_harq_pid
];
if
(
harq
->
round
!=
0
)
{
/* retransmission */
if
(
harq
->
round
!=
0
)
{
/* retransmission */
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
f496a08a
...
@@ -128,7 +128,7 @@ static inline uint8_t get_max_cces(uint8_t scs) {
...
@@ -128,7 +128,7 @@ static inline uint8_t get_max_cces(uint8_t scs) {
NR_ControlResourceSet_t
*
get_coreset
(
NR_BWP_Downlink_t
*
bwp
,
NR_ControlResourceSet_t
*
get_coreset
(
NR_BWP_Downlink_t
*
bwp
,
NR_SearchSpace_t
*
ss
,
NR_SearchSpace_t
*
ss
,
int
ss_type
)
{
int
ss_type
)
{
NR_ControlResourceSetId_t
coreset_id
=
*
ss
->
controlResourceSetId
;
NR_ControlResourceSetId_t
coreset_id
=
*
ss
->
controlResourceSetId
;
if
(
ss_type
==
0
)
{
// common search space
if
(
ss_type
==
0
)
{
// common search space
AssertFatal
(
coreset_id
!=
0
,
"coreset0 currently not supported
\n
"
);
AssertFatal
(
coreset_id
!=
0
,
"coreset0 currently not supported
\n
"
);
...
@@ -482,7 +482,7 @@ void nr_fill_nfapi_dl_pdu(int Mod_idP,
...
@@ -482,7 +482,7 @@ void nr_fill_nfapi_dl_pdu(int Mod_idP,
gNB_MAC_INST
*
nr_mac
=
RC
.
nrmac
[
Mod_idP
];
gNB_MAC_INST
*
nr_mac
=
RC
.
nrmac
[
Mod_idP
];
NR_COMMON_channels_t
*
cc
=
nr_mac
->
common_channels
;
NR_COMMON_channels_t
*
cc
=
nr_mac
->
common_channels
;
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
const
int
bwp_id
=
sched_ctrl
->
active_bwp
->
bwp_Id
;
const
int
bwp_id
=
sched_ctrl
->
active_bwp
->
bwp_Id
;
const
int
nrOfLayers
=
1
;
const
int
nrOfLayers
=
1
;
const
int
mcs
=
sched_ctrl
->
mcs
;
const
int
mcs
=
sched_ctrl
->
mcs
;
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
f496a08a
...
@@ -156,7 +156,7 @@ void nr_fill_nfapi_dl_pdu(int Mod_id,
...
@@ -156,7 +156,7 @@ void nr_fill_nfapi_dl_pdu(int Mod_id,
int
harq_pid
,
int
harq_pid
,
int
ndi
,
int
ndi
,
int
round
,
int
round
,
int
UE_beam_index
);
int
UE_beam_index
);
void
nr_rx_acknack
(
nfapi_nr_uci_pusch_pdu_t
*
uci_pusch
,
void
nr_rx_acknack
(
nfapi_nr_uci_pusch_pdu_t
*
uci_pusch
,
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
,
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
,
...
@@ -249,7 +249,7 @@ void nr_configure_dci(gNB_MAC_INST *nr_mac,
...
@@ -249,7 +249,7 @@ void nr_configure_dci(gNB_MAC_INST *nr_mac,
NR_ControlResourceSet_t
*
coreset
,
NR_ControlResourceSet_t
*
coreset
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_BWP_Downlink_t
*
bwp
,
NR_BWP_Downlink_t
*
bwp
,
uint8_t
beam_index
,
uint8_t
beam_index
,
uint8_t
aggregation_level
,
uint8_t
aggregation_level
,
int
CCEIndex
);
int
CCEIndex
);
...
...
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