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
alex037yang
OpenXG-RAN
Commits
69721198
Commit
69721198
authored
Feb 10, 2020
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nr MAC uplink: aDD identification of MAC uplink PDU CEs at gNB (receiver) side
parent
626daecf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
91 additions
and
3 deletions
+91
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+91
-3
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
69721198
...
@@ -606,6 +606,83 @@ void nr_process_mac_pdu(
...
@@ -606,6 +606,83 @@ void nr_process_mac_pdu(
LOG_D(MAC, "[UE] LCID %d, PDU length %d\n", ((NR_MAC_SUBHEADER_FIXED *)pdu_ptr)->LCID, pdu_len);
LOG_D(MAC, "[UE] LCID %d, PDU length %d\n", ((NR_MAC_SUBHEADER_FIXED *)pdu_ptr)->LCID, pdu_len);
#endif*/
#endif*/
case
UL_SCH_LCID_S_BSR
:
//38.321 section 6.1.3.1
//fixed length
mac_ce_len
=
1
;
/* Extract short BSR value */
break
;
case
UL_SCH_LCID_S_TRUNCATED_BSR
:
//38.321 section 6.1.3.1
//fixed length
mac_ce_len
=
1
;
/* Extract short truncated BSR value */
break
;
case
UL_SCH_LCID_L_BSR
:
//38.321 section 6.1.3.1
//variable length
mac_ce_len
|=
(
uint16_t
)((
NR_MAC_SUBHEADER_SHORT
*
)
pdu_ptr
)
->
L
;
mac_subheader_len
=
2
;
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pdu_ptr
)
->
F
){
mac_ce_len
|=
(
uint16_t
)(((
NR_MAC_SUBHEADER_LONG
*
)
pdu_ptr
)
->
L2
)
<<
8
;
mac_subheader_len
=
3
;
}
/* Extract long BSR value */
break
;
case
UL_SCH_LCID_L_TRUNCATED_BSR
:
//38.321 section 6.1.3.1
//variable length
mac_ce_len
|=
(
uint16_t
)((
NR_MAC_SUBHEADER_SHORT
*
)
pdu_ptr
)
->
L
;
mac_subheader_len
=
2
;
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pdu_ptr
)
->
F
){
mac_ce_len
|=
(
uint16_t
)(((
NR_MAC_SUBHEADER_LONG
*
)
pdu_ptr
)
->
L2
)
<<
8
;
mac_subheader_len
=
3
;
}
/* Extract long truncated BSR value */
break
;
case
UL_SCH_LCID_C_RNTI
:
//38.321 section 6.1.3.2
//fixed length
mac_ce_len
=
2
;
/* Extract CRNTI value */
break
;
case
UL_SCH_LCID_SINGLE_ENTRY_PHR
:
//38.321 section 6.1.3.8
//fixed length
mac_ce_len
=
2
;
/* Extract SINGLE ENTRY PHR elements for PHR calculation */
break
;
case
UL_SCH_LCID_MULTI_ENTRY_PHR_1_OCT
:
//38.321 section 6.1.3.9
// varialbe length
mac_ce_len
|=
(
uint16_t
)((
NR_MAC_SUBHEADER_SHORT
*
)
pdu_ptr
)
->
L
;
mac_subheader_len
=
2
;
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pdu_ptr
)
->
F
){
mac_ce_len
|=
(
uint16_t
)(((
NR_MAC_SUBHEADER_LONG
*
)
pdu_ptr
)
->
L2
)
<<
8
;
mac_subheader_len
=
3
;
}
/* Extract MULTI ENTRY PHR elements from single octet bitmap for PHR calculation */
break
;
case
UL_SCH_LCID_MULTI_ENTRY_PHR_4_OCT
:
//38.321 section 6.1.3.9
// varialbe length
mac_ce_len
|=
(
uint16_t
)((
NR_MAC_SUBHEADER_SHORT
*
)
pdu_ptr
)
->
L
;
mac_subheader_len
=
2
;
if
(((
NR_MAC_SUBHEADER_SHORT
*
)
pdu_ptr
)
->
F
){
mac_ce_len
|=
(
uint16_t
)(((
NR_MAC_SUBHEADER_LONG
*
)
pdu_ptr
)
->
L2
)
<<
8
;
mac_subheader_len
=
3
;
}
/* Extract MULTI ENTRY PHR elements from four octets bitmap for PHR calculation */
break
;
case
UL_SCH_LCID_PADDING
:
case
UL_SCH_LCID_PADDING
:
done
=
1
;
done
=
1
;
// end of MAC PDU, can ignore the rest.
// end of MAC PDU, can ignore the rest.
...
@@ -682,6 +759,17 @@ void nr_rx_sdu(module_id_t module_idP,
...
@@ -682,6 +759,17 @@ void nr_rx_sdu(module_id_t module_idP,
uint8_t
*
pduP
=
pdu
;
uint8_t
*
pduP
=
pdu
;
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
LOG_I
(
MAC
,
"Printing received UL MAC payload at gNB side: %d
\n
"
);
for
(
int
i
=
0
;
i
<
pdu_len
;
i
++
)
{
//harq_process_ul_ue->a[i] = (unsigned char) rand();
//printf("a[%d]=0x%02x\n",i,harq_process_ul_ue->a[i]);
printf
(
"%02x "
,(
unsigned
char
)
pduP
[
i
]);
}
printf
(
"
\n
"
);
#endif
// Processing MAC PDU
// Processing MAC PDU
// it parses MAC CEs subheaders, MAC CEs, SDU subheaderds and SDUs
// it parses MAC CEs subheaders, MAC CEs, SDU subheaderds and SDUs
if
(
pduP
!=
NULL
){
if
(
pduP
!=
NULL
){
...
...
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