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
ZhouShuya
OpenXG-RAN
Commits
a4a5ef6b
Commit
a4a5ef6b
authored
Apr 08, 2021
by
masayuki.harada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add buffer check DCCH in DLSCH scheduling.
Change RRCSetup type from DCCH to CCCH. Add comment
parent
37a6a53f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
78 additions
and
37 deletions
+78
-37
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+0
-1
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+1
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+1
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+66
-29
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+2
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+1
-1
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
+4
-2
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+2
-2
No files found.
executables/nr-uesoftmodem.c
View file @
a4a5ef6b
...
...
@@ -514,7 +514,6 @@ int main( int argc, char **argv ) {
RC
.
nrrrc
=
(
gNB_RRC_INST
**
)
malloc
(
1
*
sizeof
(
gNB_RRC_INST
*
));
RC
.
nrrrc
[
0
]
=
(
gNB_RRC_INST
*
)
malloc
(
sizeof
(
gNB_RRC_INST
));
RC
.
nrrrc
[
0
]
->
node_type
=
ngran_gNB
;
//nr_rrc_ue_generate_RRCSetupRequest(ctxt_pP.module_id, 0); //TODO need to set ctxt_pP
if
(
create_tasks_nrue
(
1
)
<
0
)
{
printf
(
"cannot create ITTI tasks
\n
"
);
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
a4a5ef6b
...
...
@@ -1353,6 +1353,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
#else
int
off
=
0
;
#endif
// TODO this is temporary change to get message5 should revert.
double
p_shift
=
0
.
004761
90476190476
;
short
*
IQ_temp
=
(
short
*
)
&
gNB
->
pusch_vars
[
ulsch_id
]
->
rxdataF_comp
[
0
][
rel15_ul
->
start_symbol_index
*
(
off
+
rel15_ul
->
rb_size
*
NR_NB_SC_PER_RB
)];
double
ttt
[
2
];
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
a4a5ef6b
...
...
@@ -1778,7 +1778,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
// MSG4 RRC Setup 38.331
// variable length
if
((
ra
->
ra_state
==
WAIT_CONTENTION_RESOLUTION
)
&&
(
get_softmodem_params
()
->
sa
==
1
))
{
LOG_I
(
MAC
,
"[UE %d][RAPROC] Frame %d : received Msg
3
\n
"
,
module_idP
,
frameP
);
LOG_I
(
MAC
,
"[UE %d][RAPROC] Frame %d : received Msg
4
\n
"
,
module_idP
,
frameP
);
if
(
ra
->
RA_active
==
1
){
nr_ra_succeeded
(
module_idP
,
frameP
,
slot
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
a4a5ef6b
...
...
@@ -1155,6 +1155,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// Bytes to be transmitted
uint8_t
*
buf
=
(
uint8_t
*
)
harq
->
tb
;
uint16_t
mac_pdu_length
=
0
;
//TODO Don't set MAC header in SA.
if
(
get_softmodem_params
()
->
sa
!=
1
)
{
mac_pdu_length
=
nr_write_ce_dlsch_pdu
(
module_idP
,
nr_mac
->
sched_ctrlCommon
,
buf
,
255
,
ra
->
cont_res_id
);
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
a4a5ef6b
...
...
@@ -334,45 +334,82 @@ void nr_store_dlsch_buffer(module_id_t module_id,
sub_frame_t
slot
)
{
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
module_id
]
->
UE_info
;
int
lcid
=
0
;
int
num_dtch
=
1
;
for
(
int
UE_id
=
UE_info
->
list
.
head
;
UE_id
>=
0
;
UE_id
=
UE_info
->
list
.
next
[
UE_id
])
{
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
sched_ctrl
->
num_total_bytes
=
0
;
loop_dcch_dtch
=
BOOL_NOT
(
loop_dcch_dtch
);
const
int
lcid
=
loop_dcch_dtch
?
DL_SCH_LCID_DTCH
:
DL_SCH_LCID_DCCH
;
// const int lcid = DL_SCH_LCID_DTCH;
const
uint16_t
rnti
=
UE_info
->
rnti
[
UE_id
];
sched_ctrl
->
rlc_status
[
lcid
]
=
mac_rlc_status_ind
(
module_id
,
rnti
,
module_id
,
frame
,
slot
,
ENB_FLAG_YES
,
MBMS_FLAG_NO
,
lcid
,
0
,
0
);
sched_ctrl
->
num_total_bytes
+=
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
;
LOG_I
(
MAC
,
"%d.%d, LCID%d:->DLSCH, RLC status %d bytes.
\n
"
,
frame
,
slot
,
lcid
,
sched_ctrl
->
num_total_bytes
);
// Check DCCH status
// TODO check CCCH?
for
(
lcid
=
DL_SCH_LCID_DCCH
;
lcid
<
(
DL_SCH_LCID_DCCH1
+
1
);
lcid
++
){
const
uint16_t
rnti
=
UE_info
->
rnti
[
UE_id
];
sched_ctrl
->
rlc_status
[
lcid
]
=
mac_rlc_status_ind
(
module_id
,
rnti
,
module_id
,
frame
,
slot
,
ENB_FLAG_YES
,
MBMS_FLAG_NO
,
lcid
,
0
,
0
);
sched_ctrl
->
num_total_bytes
+=
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
;
LOG_D
(
MAC
,
"%d.%d, LCID%d:->DLSCH, RLC status %d bytes.
\n
"
,
frame
,
slot
,
lcid
,
sched_ctrl
->
num_total_bytes
);
if
(
sched_ctrl
->
num_total_bytes
==
0
&&
!
sched_ctrl
->
ta_apply
)
/* If TA should be applied, give at least one RB */
return
;
if
(
sched_ctrl
->
num_total_bytes
==
0
&&
!
sched_ctrl
->
ta_apply
)
/* If TA should be applied, give at least one RB */
continue
;
LOG_D
(
MAC
,
"[%s][%d.%d], DTCH%d->DLSCH, RLC status %d bytes TA %d
\n
"
,
__func__
,
LOG_I
(
MAC
,
"[%s][%d.%d], DCCH%d->DLSCH, RLC status %d bytes TA %d
\n
"
,
__func__
,
frame
,
slot
,
lcid
,
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
,
sched_ctrl
->
ta_apply
);
}
// Check DTCH status
for
(
lcid
=
DL_SCH_LCID_DTCH
;
lcid
<
(
DL_SCH_LCID_DTCH
+
num_dtch
);
lcid
++
){
const
uint16_t
rnti
=
UE_info
->
rnti
[
UE_id
];
sched_ctrl
->
rlc_status
[
lcid
]
=
mac_rlc_status_ind
(
module_id
,
rnti
,
module_id
,
frame
,
slot
,
ENB_FLAG_YES
,
MBMS_FLAG_NO
,
lcid
,
0
,
0
);
sched_ctrl
->
num_total_bytes
+=
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
;
LOG_D
(
MAC
,
"%d.%d, LCID%d:->DLSCH, RLC status %d bytes.
\n
"
,
frame
,
slot
,
lcid
,
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
,
sched_ctrl
->
ta_apply
);
sched_ctrl
->
num_total_bytes
);
if
(
sched_ctrl
->
num_total_bytes
==
0
&&
!
sched_ctrl
->
ta_apply
)
/* If TA should be applied, give at least one RB */
continue
;
LOG_I
(
MAC
,
"[%s][%d.%d], DTCH%d->DLSCH, RLC status %d bytes TA %d
\n
"
,
__func__
,
frame
,
slot
,
lcid
,
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
,
sched_ctrl
->
ta_apply
);
}
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
a4a5ef6b
...
...
@@ -668,6 +668,7 @@ void pf_ul(module_id_t module_id,
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
if
(
sched_ctrl
->
ra_state
==
1
)
continue
;
int
rbStart
=
NRRIV2PRBOFFSET
(
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
// TODO this is temporary change to get message5 should revert.
rbStart
+=
27
;
const
uint16_t
bwpSize
=
NRRIV2BW
(
sched_ctrl
->
active_ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
...
...
@@ -738,7 +739,7 @@ void pf_ul(module_id_t module_id,
/* Calculate TBS from MCS */
NR_sched_pusch_t
*
sched_pusch
=
&
sched_ctrl
->
sched_pusch
;
const
int
mcs
=
4
;
const
int
mcs
=
4
;
// TODO This is temporary change to get message5 stable. should revert.
sched_pusch
->
mcs
=
mcs
;
sched_pusch
->
R
=
nr_get_code_rate_ul
(
mcs
,
ps
->
mcs_table
);
sched_pusch
->
Qm
=
nr_get_Qm_ul
(
mcs
,
ps
->
mcs_table
);
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
a4a5ef6b
...
...
@@ -1040,7 +1040,7 @@ boolean_t nr_rrc_pdcp_config_asn1_req(
//kUPenc != NULL ||
pmch_InfoList_r9
!=
NULL
/*||
defaultDRB != NULL */
)
{
//
TODO;
TODO
;
}
if
(
srb2add_list
!=
NULL
)
{
...
...
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
View file @
a4a5ef6b
...
...
@@ -671,10 +671,12 @@ static void add_srb(int rnti, struct NR_SRB_ToAddMod *s, NR_RLC_BearerConfig_t *
logical_channel_group
=
*
l
->
ul_SpecificParameters
->
logicalChannelGroup
;
/* assume logical_channel_group is 1 in NSA */
/* assume logical_channel_group is 0 in SA */
/* TODO: accept other values? */
if
(
logical_channel_group
!=
1
)
{
if
(
(
logical_channel_group
!=
0
)
&&
(
logical_channel_group
!=
1
)
)
{
LOG_E
(
RLC
,
"%s:%d:%s: fatal error
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
//
exit(1);
exit
(
1
);
}
switch
(
r
->
present
)
{
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
a4a5ef6b
...
...
@@ -433,7 +433,7 @@ rrc_gNB_generate_RRCSetup(
}
// for rfsim, send RRCSetup messgae in SRB1
nr_rrc_data_req
(
ctxt_pP
,
D
CCH
,
C
CCH
,
rrc_gNB_mui
++
,
SDU_CONFIRM_NO
,
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
,
...
...
@@ -488,7 +488,7 @@ rrc_gNB_generate_RRCSetup(
// ue_context_pP->ue_context.ue_rrc_inactivity_timer = 0;
nr_rrc_data_req
(
ctxt_pP
,
D
CCH
,
C
CCH
,
rrc_gNB_mui
++
,
SDU_CONFIRM_NO
,
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
,
...
...
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