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
lizhongxiao
OpenXG-RAN
Commits
305347af
Commit
305347af
authored
May 02, 2022
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indentation and improve function nr_mac_enable_ue_rrc_processing_timer
parent
79d9c2e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
32 deletions
+32
-32
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+16
-15
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+16
-17
No files found.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
305347af
...
@@ -450,22 +450,23 @@ void config_common(int Mod_idP, int ssb_SubcarrierOffset, rrc_pdsch_AntennaPorts
...
@@ -450,22 +450,23 @@ void config_common(int Mod_idP, int ssb_SubcarrierOffset, rrc_pdsch_AntennaPorts
}
}
int
nr_mac_enable_ue_rrc_processing_timer
(
module_id_t
Mod_idP
,
rnti_t
rnti
,
NR_SubcarrierSpacing_t
subcarrierSpacing
,
uint32_t
rrc_reconfiguration_delay
)
{
int
nr_mac_enable_ue_rrc_processing_timer
(
module_id_t
Mod_idP
,
rnti_t
rnti
,
NR_SubcarrierSpacing_t
subcarrierSpacing
,
uint32_t
rrc_reconfiguration_delay
)
{
if
(
rrc_reconfiguration_delay
>
0
)
{
const
int
UE_id
=
find_nr_UE_id
(
Mod_idP
,
rnti
);
if
(
rrc_reconfiguration_delay
==
0
)
{
if
(
UE_id
>=
0
)
{
return
-
1
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
;
}
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
const
int
UE_id
=
find_nr_UE_id
(
Mod_idP
,
rnti
);
if
(
sched_ctrl
->
rrc_processing_timer
==
0
)
{
if
(
UE_id
<
0
)
{
const
uint16_t
sf_ahead
=
(
uint16_t
)
ceil
(
6
.
0
/
(
float
)(
0x01
<<
subcarrierSpacing
));
LOG_W
(
NR_MAC
,
"Could not find UE for RNTI 0x%04x
\n
"
,
rnti
);
const
uint16_t
sl_ahead
=
sf_ahead
*
(
0x01
<<
subcarrierSpacing
);
return
-
1
;
sched_ctrl
->
rrc_processing_timer
=
(
rrc_reconfiguration_delay
<<
subcarrierSpacing
)
+
sl_ahead
;
LOG_I
(
NR_MAC
,
"Activating RRC processing timer for UE %d
\n
"
,
UE_id
);
}
}
else
{
LOG_W
(
NR_MAC
,
"Could not find UE for RNTI 0x%04x
\n
"
,
rnti
);
return
-
1
;
}
}
}
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
const
uint16_t
sf_ahead
=
6
/
(
0x01
<<
subcarrierSpacing
)
+
((
6
%
(
0x01
<<
subcarrierSpacing
))
>
0
);
const
uint16_t
sl_ahead
=
sf_ahead
*
(
0x01
<<
subcarrierSpacing
);
sched_ctrl
->
rrc_processing_timer
=
(
rrc_reconfiguration_delay
<<
subcarrierSpacing
)
+
sl_ahead
;
LOG_I
(
NR_MAC
,
"Activating RRC processing timer for UE %d
\n
"
,
UE_id
);
return
0
;
return
0
;
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
305347af
...
@@ -1059,14 +1059,13 @@ nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(module_id_t module_id, int CC_id) {
...
@@ -1059,14 +1059,13 @@ nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(module_id_t module_id, int CC_id) {
const
uint8_t
Qm
=
nr_get_Qm_dl
(
mcs
,
mcsTableIdx
);
const
uint8_t
Qm
=
nr_get_Qm_dl
(
mcs
,
mcsTableIdx
);
const
uint16_t
R
=
nr_get_code_rate_dl
(
mcs
,
mcsTableIdx
);
const
uint16_t
R
=
nr_get_code_rate_dl
(
mcs
,
mcsTableIdx
);
pf_tbs
[
mcsTableIdx
][
mcs
]
=
nr_compute_tbs
(
Qm
,
pf_tbs
[
mcsTableIdx
][
mcs
]
=
nr_compute_tbs
(
Qm
,
R
,
R
,
1
,
/* rbSize */
1
,
/* rbSize */
10
,
/* hypothetical number of slots */
10
,
/* hypothetical number of slots */
0
,
/* N_PRB_DMRS * N_DMRS_SLOT */
0
,
/* N_PRB_DMRS * N_DMRS_SLOT */
0
/* N_PRB_oh, 0 for initialBWP */
,
0
/* N_PRB_oh, 0 for initialBWP */
,
0
/* tb_scaling */
,
0
/* tb_scaling */
,
1
/* nrOfLayers */
)
1
/* nrOfLayers */
)
>>
3
;
>>
3
;
}
}
}
}
...
@@ -1274,15 +1273,15 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -1274,15 +1273,15 @@ void nr_schedule_ue_spec(module_id_t module_id,
if
(
phaseTrackingRS
)
{
if
(
phaseTrackingRS
)
{
bool
valid_ptrs_setup
=
set_dl_ptrs_values
(
phaseTrackingRS
->
choice
.
setup
,
bool
valid_ptrs_setup
=
set_dl_ptrs_values
(
phaseTrackingRS
->
choice
.
setup
,
pdsch_pdu
->
rbSize
,
pdsch_pdu
->
rbSize
,
pdsch_pdu
->
mcsIndex
[
0
],
pdsch_pdu
->
mcsIndex
[
0
],
pdsch_pdu
->
mcsTable
[
0
],
pdsch_pdu
->
mcsTable
[
0
],
&
pdsch_pdu
->
PTRSFreqDensity
,
&
pdsch_pdu
->
PTRSFreqDensity
,
&
pdsch_pdu
->
PTRSTimeDensity
,
&
pdsch_pdu
->
PTRSTimeDensity
,
&
pdsch_pdu
->
PTRSPortIndex
,
&
pdsch_pdu
->
PTRSPortIndex
,
&
pdsch_pdu
->
nEpreRatioOfPDSCHToPTRS
,
&
pdsch_pdu
->
nEpreRatioOfPDSCHToPTRS
,
&
pdsch_pdu
->
PTRSReOffset
,
&
pdsch_pdu
->
PTRSReOffset
,
pdsch_pdu
->
NrOfSymbols
);
pdsch_pdu
->
NrOfSymbols
);
if
(
valid_ptrs_setup
)
if
(
valid_ptrs_setup
)
pdsch_pdu
->
pduBitmap
|=
0x1
;
// Bit 0: pdschPtrs - Indicates PTRS included (FR2)
pdsch_pdu
->
pduBitmap
|=
0x1
;
// Bit 0: pdschPtrs - Indicates PTRS included (FR2)
...
...
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