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
2cda03b0
Commit
2cda03b0
authored
Oct 09, 2023
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compilation ok
parent
198c3197
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
25 deletions
+27
-25
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+1
-1
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures_sl.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures_sl.c
+6
-4
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+20
-20
No files found.
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
2cda03b0
...
@@ -483,7 +483,7 @@ void nr_mac_rrc_sl_mib_ind(const module_id_t module_id,
...
@@ -483,7 +483,7 @@ void nr_mac_rrc_sl_mib_ind(const module_id_t module_id,
uint8_t
*
pduP
,
uint8_t
*
pduP
,
const
sdu_size_t
pdu_len
,
const
sdu_size_t
pdu_len
,
const
uint16_t
rx_slss_id
);
const
uint16_t
rx_slss_id
);
bool
nr_schedule_slsch
(
nr_sci_pdu_t
*
sci_pdu
,
bool
nr_schedule_slsch
(
int
frameP
,
int
slotP
,
nr_sci_pdu_t
*
sci_pdu
,
nr_sci_pdu_t
*
sci2_pdu
,
nr_sci_pdu_t
*
sci2_pdu
,
uint8_t
*
slsch_pdu
,
uint8_t
*
slsch_pdu
,
nr_sci_format_t
format2
,
nr_sci_format_t
format2
,
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures_sl.c
View file @
2cda03b0
...
@@ -584,13 +584,13 @@ void nr_ue_process_mac_sl_pdu(int module_idP,
...
@@ -584,13 +584,13 @@ void nr_ue_process_mac_sl_pdu(int module_idP,
int32_t
pdu_len
=
(
int32_t
)(
rx_ind
->
rx_indication_body
+
pdu_id
)
->
rx_slsch_pdu
.
pdu_length
;
int32_t
pdu_len
=
(
int32_t
)(
rx_ind
->
rx_indication_body
+
pdu_id
)
->
rx_slsch_pdu
.
pdu_length
;
uint8_t
done
=
0
;
uint8_t
done
=
0
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_idP
);
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_idP
);
int
frame
=
rx_ind
->
sfn
;
int
slot
=
rx_ind
->
slot
;
if
(
!
pduP
){
if
(
!
pduP
){
return
;
return
;
}
}
LOG_I
(
NR_MAC
,
"In %s : processing PDU %d (with length %d) of %d total number of PDUs...
\n
"
,
__FUNCTION__
,
pdu_id
,
pdu_len
,
rx_ind
->
number_pdus
);
LOG_I
(
NR_MAC
,
"In %s : processing PDU %d (with length %d) of %d total number of PDUs...
\n
"
,
__FUNCTION__
,
pdu_id
,
pdu_len
,
rx_ind
->
number_pdus
);
mac
->
sl_info
while
(
!
done
&&
pdu_len
>
0
){
while
(
!
done
&&
pdu_len
>
0
){
uint16_t
mac_len
=
0x0000
;
uint16_t
mac_len
=
0x0000
;
...
@@ -604,12 +604,12 @@ void nr_ue_process_mac_sl_pdu(int module_idP,
...
@@ -604,12 +604,12 @@ void nr_ue_process_mac_sl_pdu(int module_idP,
case
SL_SCH_LCID_4_19
:
case
SL_SCH_LCID_4_19
:
if
(
!
get_mac_len
(
pduP
,
pdu_len
,
&
mac_len
,
&
mac_subheader_len
))
if
(
!
get_mac_len
(
pduP
,
pdu_len
,
&
mac_len
,
&
mac_subheader_len
))
return
;
return
;
LOG_D
(
NR_MAC
,
"%4d.%2d : SLSCH -> LCID %d %d bytes
\n
"
,
frame
P
,
slot
,
rx_lcid
,
mac_len
);
LOG_D
(
NR_MAC
,
"%4d.%2d : SLSCH -> LCID %d %d bytes
\n
"
,
frame
,
slot
,
rx_lcid
,
mac_len
);
mac_rlc_data_ind
(
module_idP
,
mac_rlc_data_ind
(
module_idP
,
0
,
0
,
0
,
0
,
frame
P
,
frame
,
ENB_FLAG_NO
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
MBMS_FLAG_NO
,
rx_lcid
,
rx_lcid
,
...
@@ -636,4 +636,6 @@ void nr_ue_process_mac_sl_pdu(int module_idP,
...
@@ -636,4 +636,6 @@ void nr_ue_process_mac_sl_pdu(int module_idP,
case
SL_SCH_LCID_SL_DRX_CMD
:
case
SL_SCH_LCID_SL_DRX_CMD
:
LOG_W
(
NR_MAC
,
"Received unsupported SL LCID %d
\n
"
,
rx_lcid
);
LOG_W
(
NR_MAC
,
"Received unsupported SL LCID %d
\n
"
,
rx_lcid
);
break
;
break
;
}
}
}
}
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
2cda03b0
...
@@ -3250,24 +3250,26 @@ bool nr_ue_sl_pssch_scheduler(NR_UE_MAC_INST_t *mac,
...
@@ -3250,24 +3250,26 @@ bool nr_ue_sl_pssch_scheduler(NR_UE_MAC_INST_t *mac,
uint8_t
ret_status
=
0
;
uint8_t
ret_status
=
0
;
uint16_t
slot
=
sl_ind
->
slot_tx
;
uint16_t
slot
=
sl_ind
->
slot_tx
;
uint16_t
frame
=
sl_ind
->
frame_tx
;
uint16_t
frame
=
sl_ind
->
frame_tx
;
int
lcid
=
4
;
int
sdu_length
=
0
;
if
(
sl_ind
->
slot_type
!=
SIDELINK_SLOT_TYPE_TX
)
return
false
;
if
(
sl_ind
->
slot_type
!=
SIDELINK_SLOT_TYPE_TX
)
return
false
;
/*
if (slot > 9 && get_nrUE_params()->sync_ref) return false;
if (slot > 9 && get_nrUE_params()->sync_ref) return false;
if
(
/*slot < 10 &&*/
!
get_nrUE_params
()
->
sync_ref
)
return
false
;
if (!get_nrUE_params()->sync_ref) return false;
if ((frame&127) > 0) return false;
if ((frame&127) > 0) return false;
if ((slot % 10) != 6) return false;
if ((slot % 10) != 6) return false;
*/
LOG_D
(
NR_MAC
,
"[UE%d] SL-PSSCH SCHEDULER: Frame:SLOT %d:%d, slot_type:%d
\n
"
,
LOG_D
(
NR_MAC
,
"[UE%d] SL-PSSCH SCHEDULER: Frame:SLOT %d:%d, slot_type:%d
\n
"
,
sl_ind
->
module_id
,
frame
,
slot
,
sl_ind
->
slot_type
);
sl_ind
->
module_id
,
frame
,
slot
,
sl_ind
->
slot_type
);
uint16_t
slsch_pdu_length_max
;
uint16_t
slsch_pdu_length_max
;
tx_config
->
tx_config_list
[
0
].
tx_pscch_pssch_config_pdu
.
slsch_payload
=
mac
->
slsch_payload
;
tx_config
->
tx_config_list
[
0
].
tx_pscch_pssch_config_pdu
.
slsch_payload
=
mac
->
slsch_payload
;
bool
schedule_slsch
=
nr_schedule_slsch
(
&
mac
->
sci1_pdu
,
&
mac
->
sci2_pdu
,
tx_config
->
tx_config_list
[
0
].
tx_pscch_pssch_config_pdu
.
slsch_payload
,
NR_SL_SCI_FORMAT_2A
,
&
slsch_pdu_length_max
);
bool
schedule_slsch
=
nr_schedule_slsch
(
frame
,
slot
,
&
mac
->
sci1_pdu
,
&
mac
->
sci2_pdu
,
tx_config
->
tx_config_list
[
0
].
tx_pscch_pssch_config_pdu
.
slsch_payload
,
NR_SL_SCI_FORMAT_2A
,
&
slsch_pdu_length_max
);
if
(
!
schedule_slsch
)
return
false
;
if
(
!
schedule_slsch
)
return
false
;
...
@@ -3300,23 +3302,22 @@ bool nr_ue_sl_pssch_scheduler(NR_UE_MAC_INST_t *mac,
...
@@ -3300,23 +3302,22 @@ bool nr_ue_sl_pssch_scheduler(NR_UE_MAC_INST_t *mac,
//nr_ue_get_sdu_mac_ce_pre updates all mac_ce related header field related to length
//nr_ue_get_sdu_mac_ce_pre updates all mac_ce related header field related to length
mac_ce_p
->
tot_mac_ce_len
=
nr_ue_get_sdu_mac_ce_pre
(
module_idP
,
CC_id
,
frameP
,
subframe
,
gNB_index
,
ulsch_buffer
,
buflen
,
mac_ce_p
);
mac_ce_p
->
tot_mac_ce_len
=
nr_ue_get_sdu_mac_ce_pre
(
0
,
0
,
frame
,
slot
,
0
,
pdu
,
buflen
,
mac_ce_p
);
mac_ce_p
->
total_mac_pdu_header_len
=
mac_ce_p
->
tot_mac_ce_len
;
mac_ce_p
->
total_mac_pdu_header_len
=
mac_ce_p
->
tot_mac_ce_len
;
buflen_remain
=
buflen
-
(
mac_ce_p
->
total_mac_pdu_header_len
+
mac_ce_p
->
sdu_length_total
+
sh_size
);
int
buflen_remain
=
buflen
-
(
mac_ce_p
->
total_mac_pdu_header_len
+
mac_ce_p
->
sdu_length_total
+
sh_size
);
LOG_
D
(
NR_MAC
,
"In %s: [UE %d
] [%d.%d] SL-DXCH -> SLSCH, RLC with LCID 0x%02x (TBS %d bytes, sdu_length_total %d bytes, MAC header len %d bytes, buflen_remain %d bytes)
\n
"
,
LOG_
I
(
NR_MAC
,
"In %s: [UE
] [%d.%d] SL-DXCH -> SLSCH, RLC with LCID 0x%02x (TBS %d bytes, sdu_length_total %d bytes, MAC header len %d bytes, buflen_remain %d bytes)
\n
"
,
__FUNCTION__
,
__FUNCTION__
,
module_idP
,
slot
,
frameP
,
frame
,
subframe
,
4
,
lcid
,
buflen
,
buflen
,
mac_ce_p
->
sdu_length_total
,
mac_ce_p
->
sdu_length_total
,
mac_ce_p
->
tot_mac_ce_len
,
mac_ce_p
->
tot_mac_ce_len
,
buflen_remain
);
buflen_remain
);
int
num_sdus
=
0
;
while
(
buflen_remain
>
0
){
while
(
buflen_remain
>
0
){
// Pointer used to build the MAC sub-PDU headers in the ULSCH buffer for each SDU
// Pointer used to build the MAC sub-PDU headers in the ULSCH buffer for each SDU
...
@@ -3324,10 +3325,10 @@ bool nr_ue_sl_pssch_scheduler(NR_UE_MAC_INST_t *mac,
...
@@ -3324,10 +3325,10 @@ bool nr_ue_sl_pssch_scheduler(NR_UE_MAC_INST_t *mac,
pdu
+=
sh_size
;
pdu
+=
sh_size
;
sdu_length
=
mac_rlc_data_req
(
module_idP
,
sdu_length
=
mac_rlc_data_req
(
0
,
0
,
0
,
0
,
0
,
frame
P
,
frame
,
ENB_FLAG_NO
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
MBMS_FLAG_NO
,
lcid
,
lcid
,
...
@@ -3344,11 +3345,11 @@ bool nr_ue_sl_pssch_scheduler(NR_UE_MAC_INST_t *mac,
...
@@ -3344,11 +3345,11 @@ bool nr_ue_sl_pssch_scheduler(NR_UE_MAC_INST_t *mac,
if
(
sdu_length
>
0
)
{
if
(
sdu_length
>
0
)
{
LOG_
D
(
NR_MAC
,
"In %s: [UE %d] [%d.%d] SL-DXCH -> SLSCH, Generating SL MAC sub-PDU for SDU %d, length %d bytes, RB with LCID 0x%02x (buflen (TBS) %d bytes)
\n
"
,
LOG_
I
(
NR_MAC
,
"In %s: [UE %d] [%d.%d] SL-DXCH -> SLSCH, Generating SL MAC sub-PDU for SDU %d, length %d bytes, RB with LCID 0x%02x (buflen (TBS) %d bytes)
\n
"
,
__FUNCTION__
,
__FUNCTION__
,
module_idP
,
0
,
frame
P
,
frame
,
s
ubframe
,
s
lot
,
num_sdus
+
1
,
num_sdus
+
1
,
sdu_length
,
sdu_length
,
lcid
,
lcid
,
...
@@ -3380,7 +3381,6 @@ bool nr_ue_sl_pssch_scheduler(NR_UE_MAC_INST_t *mac,
...
@@ -3380,7 +3381,6 @@ bool nr_ue_sl_pssch_scheduler(NR_UE_MAC_INST_t *mac,
buflen_remain
=
buflen
-
(
mac_ce_p
->
total_mac_pdu_header_len
+
mac_ce_p
->
sdu_length_total
+
sh_size
);
buflen_remain
=
buflen
-
(
mac_ce_p
->
total_mac_pdu_header_len
+
mac_ce_p
->
sdu_length_total
+
sh_size
);
}
}
}
return
true
;
return
true
;
}
}
...
...
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