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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
1c84699e
Commit
1c84699e
authored
Apr 23, 2024
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handled freeing of PSFCH information in case PSFCH_Period = 0
parent
9879c13c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
18 deletions
+33
-18
openair2/LAYER2/NR_MAC_UE/nr_slsch_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_slsch_scheduler.c
+1
-1
openair2/RRC/NR_UE/rrc_sl_preconfig.c
openair2/RRC/NR_UE/rrc_sl_preconfig.c
+32
-17
No files found.
openair2/LAYER2/NR_MAC_UE/nr_slsch_scheduler.c
View file @
1c84699e
...
...
@@ -50,7 +50,7 @@ bool nr_schedule_slsch(NR_UE_MAC_INST_t *mac, int frameP,int slotP, nr_sci_pdu_t
uint8_t
slots_per_frame
=
nr_slots_per_frame
[
mu
];
uint8_t
psfch_period
=
0
;
if
(
mac
->
sl_tx_res_pool
->
sl_PSFCH_Config_r16
)
if
(
mac
->
sl_tx_res_pool
->
sl_PSFCH_Config_r16
&&
mac
->
sl_tx_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_Period_r16
)
psfch_period
=
*
mac
->
sl_tx_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_Period_r16
;
// rlc_status.bytes_in_buffer = 0;
*
slsch_pdu_length_max
=
0
;
...
...
openair2/RRC/NR_UE/rrc_sl_preconfig.c
View file @
1c84699e
...
...
@@ -242,23 +242,38 @@ static void prepare_NR_SL_ResourcePool(NR_SL_ResourcePool_r16_t *sl_res_pool,
config_get
(
SL_POOLPARAMS
,
sizeof
(
SL_POOLPARAMS
)
/
sizeof
(
paramdef_t
),
aprefix
);
struct
NR_SL_PSFCH_Config_r16
*
nr_sl_psfch_config
=
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
;
const
uint8_t
psfch_periods
[]
=
{
0
,
1
,
2
,
4
};
AssertFatal
(
*
nr_sl_psfch_config
->
sl_PSFCH_Period_r16
<
4
,
"sl_PSFCH_Period_r16 index must be less than 4
\n
"
);
uint8_t
psfch_period
=
psfch_periods
[
*
nr_sl_psfch_config
->
sl_PSFCH_Period_r16
];
uint16_t
prod_numCh_period
=
*
sl_res_pool
->
sl_NumSubchannel_r16
*
psfch_period
;
uint16_t
num_prbs
=
(
*
sl_res_pool
->
sl_RB_Number_r16
/
prod_numCh_period
)
*
prod_numCh_period
;
uint16_t
num_bytes
=
(
num_prbs
%
8
)
?
(
num_prbs
/
8
)
+
1
:
(
num_prbs
/
8
);
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_RB_Set_r16
->
size
=
num_bytes
;
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_RB_Set_r16
->
bits_unused
=
(
num_prbs
%
8
)
?
8
-
(
num_prbs
%
8
)
:
0
;
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_RB_Set_r16
->
buf
=
calloc
(
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_RB_Set_r16
->
size
,
sizeof
(
uint8_t
));
memset
(
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_RB_Set_r16
->
buf
,
0xFF
,
num_prbs
/
8
);
uint8_t
remaining_prbs
=
0
;
for
(
int
i
=
8
-
(
num_prbs
%
8
);
i
<
8
;
i
++
)
remaining_prbs
|=
1
<<
i
;
if
(
num_prbs
%
8
!=
0
)
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_RB_Set_r16
->
buf
[
num_prbs
/
8
]
=
remaining_prbs
;
LOG_D
(
RRC
,
"M: %d, PRBs %d, size in bytes %d, unused bits %d, full size bytes %d, remaining prbs %d
\n
"
,
prod_numCh_period
,
num_prbs
,
num_bytes
,
(
num_prbs
%
8
)
?
8
-
(
num_prbs
%
8
)
:
0
,
num_prbs
/
8
,
remaining_prbs
);
if
(
*
nr_sl_psfch_config
->
sl_PSFCH_Period_r16
>
0
)
{
const
uint8_t
psfch_periods
[]
=
{
0
,
1
,
2
,
4
};
AssertFatal
(
*
nr_sl_psfch_config
->
sl_PSFCH_Period_r16
<
4
,
"sl_PSFCH_Period_r16 index must be less than 4
\n
"
);
LOG_I
(
NR_PHY
,
"Configuring PSFCH Period %d
\n
"
,
*
nr_sl_psfch_config
->
sl_PSFCH_Period_r16
);
uint8_t
psfch_period
=
psfch_periods
[
*
nr_sl_psfch_config
->
sl_PSFCH_Period_r16
];
uint16_t
prod_numCh_period
=
*
sl_res_pool
->
sl_NumSubchannel_r16
*
psfch_period
;
uint16_t
num_prbs
=
(
*
sl_res_pool
->
sl_RB_Number_r16
/
prod_numCh_period
)
*
prod_numCh_period
;
uint16_t
num_bytes
=
(
num_prbs
%
8
)
?
(
num_prbs
/
8
)
+
1
:
(
num_prbs
/
8
);
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_RB_Set_r16
->
size
=
num_bytes
;
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_RB_Set_r16
->
bits_unused
=
(
num_prbs
%
8
)
?
8
-
(
num_prbs
%
8
)
:
0
;
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_RB_Set_r16
->
buf
=
calloc
(
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_RB_Set_r16
->
size
,
sizeof
(
uint8_t
));
memset
(
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_RB_Set_r16
->
buf
,
0xFF
,
num_prbs
/
8
);
uint8_t
remaining_prbs
=
0
;
for
(
int
i
=
8
-
(
num_prbs
%
8
);
i
<
8
;
i
++
)
remaining_prbs
|=
1
<<
i
;
if
(
num_prbs
%
8
!=
0
)
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_RB_Set_r16
->
buf
[
num_prbs
/
8
]
=
remaining_prbs
;
LOG_D
(
RRC
,
"M: %d, PRBs %d, size in bytes %d, unused bits %d, full size bytes %d, remaining prbs %d
\n
"
,
prod_numCh_period
,
num_prbs
,
num_bytes
,
(
num_prbs
%
8
)
?
8
-
(
num_prbs
%
8
)
:
0
,
num_prbs
/
8
,
remaining_prbs
);
}
else
{
LOG_I
(
NR_RRC
,
"Freeing sl_PSFCH_Config_r16
\n
"
);
free
(
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_CandidateResourceType_r16
);
free
(
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_HopID_r16
);
free
(
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_MinTimeGapPSFCH_r16
);
free
(
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_NumMuxCS_Pair_r16
);
free
(
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_RB_Set_r16
);
free
(
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
->
sl_PSFCH_Period_r16
);
free
(
sl_res_pool
->
sl_PSFCH_Config_r16
->
choice
.
setup
);
free
(
sl_res_pool
->
sl_PSFCH_Config_r16
);
sl_res_pool
->
sl_PSFCH_Config_r16
=
NULL
;
}
}
static
void
prepare_NR_SL_BWPConfigCommon
(
NR_SL_BWP_ConfigCommon_r16_t
*
sl_bwp
,
...
...
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