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
littleBu
OpenXG-RAN
Commits
b6e3718d
Commit
b6e3718d
authored
3 years ago
by
cig
Committed by
Thomas Schlichter
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes to nr_write_ce_ulsch_pdu
- takes in input MAC instance - uses a mac ce struct - minor fixes
parent
07a80bc8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
35 deletions
+29
-35
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+10
-15
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+2
-2
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+16
-16
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+1
-2
No files found.
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
b6e3718d
...
...
@@ -311,6 +311,15 @@ typedef struct {
}
RAR_grant_t
;
typedef
struct
{
uint8_t
phr_reporting
;
uint16_t
truncated_bsr
;
uint16_t
short_bsr
;
uint16_t
long_bsr
;
}
NR_UE_MAC_CE_t
;
/*!\brief Top level UE MAC structure */
typedef
struct
{
...
...
@@ -374,12 +383,8 @@ typedef struct {
nr_ue_if_module_t
*
if_module
;
nr_phy_config_t
phy_config
;
/// BSR report flag management
uint8_t
BSR_reporting_active
;
NR_UE_SCHEDULING_INFO
scheduling_info
;
/// PHR
uint8_t
PHR_reporting_active
;
NR_UE_MAC_CE_t
nr_ue_mac_ce
;
NR_Type0_PDCCH_CSS_config_t
type0_PDCCH_CSS_config
;
NR_SearchSpace_t
*
search_space_zero
;
...
...
@@ -390,16 +395,6 @@ typedef struct {
}
NR_UE_MAC_INST_t
;
typedef
struct
{
uint8_t
power_headroom
;
uint16_t
crnti
;
uint16_t
truncated_bsr
;
uint16_t
short_bsr
;
uint16_t
long_bsr
;
}
NR_UE_MAC_CE_t
;
typedef
enum
seach_space_mask_e
{
type0_pdcch
=
0x1
,
type0a_pdcch
=
0x2
,
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
b6e3718d
...
...
@@ -156,8 +156,8 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
NR_UL_TIME_ALIGNMENT_t
*
ul_time_alignment
,
int
pdu_id
);
int
nr_write_ce_ulsch_pdu
(
u
nsigned
char
*
mac_ce
,
NR_UE_MAC_
CE_t
*
nr_ue_mac_ce
);
int
nr_write_ce_ulsch_pdu
(
u
int8_t
*
mac_ce
,
NR_UE_MAC_
INST_t
*
mac
);
void
fill_dci_search_candidates
(
NR_SearchSpace_t
*
ss
,
fapi_nr_dl_config_dci_dl_pdu_rel15_t
*
rel15
);
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
b6e3718d
...
...
@@ -2141,22 +2141,22 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
}
}
// about: generating MAC CEs (MAC CE and subheader) for the ULSCH PDU
// returns: number of written bytes
/**
* Function: generating MAC CEs (MAC CE and subheader) for the ULSCH PDU
* Notes: TODO: PHR and BSR reporting
* Parameters:
* @mac_ce pointer to the MAC sub-PDUs including the MAC CEs
* @nr_ue_mac_ce pointer to the MAC CEs to be transmitted
* @mac pointer to the MAC instance
* Return: number of written bytes
*/
int
nr_write_ce_ulsch_pdu
(
u
nsigned
char
*
mac_ce
,
NR_UE_MAC_
CE_t
*
nr_ue_mac_ce
)
{
int
nr_write_ce_ulsch_pdu
(
u
int8_t
*
mac_ce
,
NR_UE_MAC_
INST_t
*
mac
)
{
int
mac_ce_len
=
0
;
uint8_t
mac_ce_size
=
0
;
NR_UE_MAC_CE_t
*
nr_ue_mac_ce
=
&
mac
->
nr_ue_mac_ce
;
if
(
nr_ue_mac_ce
->
power_headroom
)
{
LOG_D
(
NR_MAC
,
"In %s: generating PHR MAC CE with command %d
\n
"
,
__FUNCTION__
,
nr_ue_mac_ce
->
power_headroom
);
if
(
nr_ue_mac_ce
->
phr_reporting
&&
mac
->
phr_Config
!=
NULL
)
{
// MAC CE fixed subheader
((
NR_MAC_SUBHEADER_FIXED
*
)
mac_ce
)
->
R
=
0
;
...
...
@@ -2164,9 +2164,9 @@ int nr_write_ce_ulsch_pdu(unsigned char *mac_ce,
mac_ce
++
;
// PHR MAC CE (1 octet)
((
NR_SINGLE_ENTRY_PHR_MAC_CE
*
)
mac_ce
)
->
PH
=
nr_ue_mac_ce
->
power_headroom
;
((
NR_SINGLE_ENTRY_PHR_MAC_CE
*
)
mac_ce
)
->
PH
=
0
;
((
NR_SINGLE_ENTRY_PHR_MAC_CE
*
)
mac_ce
)
->
R1
=
0
;
((
NR_SINGLE_ENTRY_PHR_MAC_CE
*
)
mac_ce
)
->
PCMAX
=
0
;
// todo
((
NR_SINGLE_ENTRY_PHR_MAC_CE
*
)
mac_ce
)
->
PCMAX
=
0
;
((
NR_SINGLE_ENTRY_PHR_MAC_CE
*
)
mac_ce
)
->
R2
=
0
;
// update pointer and length
...
...
@@ -2176,9 +2176,9 @@ int nr_write_ce_ulsch_pdu(unsigned char *mac_ce,
}
if
(
nr_ue_mac_ce
->
crnti
)
{
if
(
!
get_softmodem_params
()
->
sa
&&
mac
->
ra
.
ra_state
==
WAIT_RAR
)
{
LOG_D
(
NR_MAC
,
"In %s: generating C-RNTI MAC CE with C-RNTI %x
\n
"
,
__FUNCTION__
,
nr_ue_mac_ce
->
crnti
);
LOG_D
(
NR_MAC
,
"In %s: generating C-RNTI MAC CE with C-RNTI %x
\n
"
,
__FUNCTION__
,
mac
->
crnti
);
// MAC CE fixed subheader
((
NR_MAC_SUBHEADER_FIXED
*
)
mac_ce
)
->
R
=
0
;
...
...
@@ -2186,7 +2186,7 @@ int nr_write_ce_ulsch_pdu(unsigned char *mac_ce,
mac_ce
++
;
// C-RNTI MAC CE (2 octets)
*
(
uint16_t
*
)
mac_ce
=
nr_ue_mac_ce
->
crnti
;
*
(
uint16_t
*
)
mac_ce
=
mac
->
crnti
;
// update pointer and length
mac_ce_size
=
sizeof
(
uint16_t
);
...
...
@@ -2197,7 +2197,7 @@ int nr_write_ce_ulsch_pdu(unsigned char *mac_ce,
if
(
nr_ue_mac_ce
->
truncated_bsr
)
{
LOG_D
(
NR_MAC
,
"In %s: generating
T
runcated BSR MAC CE with command %x
\n
"
,
__FUNCTION__
,
nr_ue_mac_ce
->
truncated_bsr
);
LOG_D
(
NR_MAC
,
"In %s: generating
short t
runcated BSR MAC CE with command %x
\n
"
,
__FUNCTION__
,
nr_ue_mac_ce
->
truncated_bsr
);
// MAC CE fixed subheader
((
NR_MAC_SUBHEADER_FIXED
*
)
mac_ce
)
->
R
=
0
;
...
...
@@ -2205,7 +2205,7 @@ int nr_write_ce_ulsch_pdu(unsigned char *mac_ce,
mac_ce
++
;
// Short truncated BSR MAC CE (1 octet)
((
NR_BSR_SHORT_TRUNCATED
*
)
mac_ce
)
->
Buffer_size
=
nr_ue_mac_ce
->
truncated_bsr
;
((
NR_BSR_SHORT_TRUNCATED
*
)
mac_ce
)
->
Buffer_size
=
0
;
((
NR_BSR_SHORT_TRUNCATED
*
)
mac_ce
)
->
LcgID
=
0
;
// update pointer and length
...
...
@@ -2215,7 +2215,7 @@ int nr_write_ce_ulsch_pdu(unsigned char *mac_ce,
}
else
if
(
nr_ue_mac_ce
->
short_bsr
)
{
LOG_D
(
NR_MAC
,
"In %s: generating
Truncated
short BSR MAC CE with command %x
\n
"
,
__FUNCTION__
,
nr_ue_mac_ce
->
short_bsr
);
LOG_D
(
NR_MAC
,
"In %s: generating short BSR MAC CE with command %x
\n
"
,
__FUNCTION__
,
nr_ue_mac_ce
->
short_bsr
);
// MAC CE fixed subheader
((
NR_MAC_SUBHEADER_FIXED
*
)
mac_ce
)
->
R
=
0
;
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
b6e3718d
...
...
@@ -1966,8 +1966,7 @@ uint8_t nr_ue_get_sdu(module_id_t module_idP,
// Preparing the MAC CEs sub-PDUs and get the total size
unsigned
char
mac_header_control_elements
[
16
]
=
{
0
};
NR_UE_MAC_CE_t
nr_ue_mac_ce
=
{.
crnti
=
mac
->
crnti
};
int
tot_mac_ce_len
=
nr_write_ce_ulsch_pdu
(
&
mac_header_control_elements
[
0
],
&
nr_ue_mac_ce
);
int
tot_mac_ce_len
=
nr_write_ce_ulsch_pdu
(
&
mac_header_control_elements
[
0
],
mac
);
uint8_t
total_mac_pdu_header_len
=
tot_mac_ce_len
;
LOG_D
(
NR_MAC
,
"In %s: [UE %d] [%d.%d] process UL transport block at with size TBS = %d bytes
\n
"
,
__FUNCTION__
,
module_idP
,
frameP
,
subframe
,
buflen
);
...
...
This diff is collapsed.
Click to expand it.
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