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
efd1f46f
Commit
efd1f46f
authored
Mar 03, 2021
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Msg4 mcsIndex assignment
parent
c457cf64
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
24 deletions
+20
-24
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+11
-6
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+9
-18
No files found.
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
efd1f46f
...
...
@@ -1836,15 +1836,20 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
mac_subheader_len
=
2
;
}
LOG_D
(
NR_MAC
,
"DL_SCH_LCID_CCCH with payload len %d: bits
\n
"
,
mac_sdu_len
);
if
(
mac_sdu_len
>
0
)
{
LOG_D
(
NR_MAC
,
"DL_SCH_LCID_CCCH with payload len %d: bits
\n
"
,
mac_sdu_len
);
LOG_D
(
NR_MAC
,
"RRCSetup received at nr_ue_process_mac_pdu with payload len %d:
\n
bits, rx bytes:
\n
"
,
mac_sdu_len
);
for
(
int
i
=
0
;
i
<
mac_sdu_len
/
8
;
i
++
)
{
LOG_D
(
NR_MAC
,
"%d: 0x%x
\n
"
,
i
,
pduP
[
i
+
2
]);
}
LOG_D
(
NR_MAC
,
"RRCSetup received at nr_ue_process_mac_pdu with payload len %d:
\n
bits, rx bytes:
\n
"
,
mac_sdu_len
);
for
(
int
i
=
0
;
i
<
mac_subheader_len
;
i
++
)
{
LOG_D
(
NR_MAC
,
"MAC header %d: 0x%x
\n
"
,
i
,
pduP
[
i
]);
}
for
(
int
i
=
0
;
i
<
mac_sdu_len
/
8
;
i
++
)
{
LOG_D
(
NR_MAC
,
"%d: 0x%x
\n
"
,
i
,
pduP
[
mac_subheader_len
+
i
]);
}
nr_mac_rrc_data_ind_ue
(
module_idP
,
CC_id
,
gNB_index
,
frameP
,
0
,
mac
->
crnti
,
CCCH
,
pduP
+
mac_subheader_len
,
mac_sdu_len
);
nr_mac_rrc_data_ind_ue
(
module_idP
,
CC_id
,
gNB_index
,
frameP
,
0
,
mac
->
crnti
,
CCCH
,
pduP
+
mac_subheader_len
,
mac_sdu_len
);
}
break
;
case
DL_SCH_LCID_TCI_STATE_ACT_UE_SPEC_PDSCH
:
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
efd1f46f
...
...
@@ -1090,7 +1090,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
int
mcsIndex
=
0
;
int
startSymbolAndLength
=
53
;
int
mcsTableIndex
=
0
;
int
startSymbolAndLength
=
0
;
int
StartSymbolIndex
=
2
;
int
NrOfSymbols
=
12
;
int
StartSymbolIndex_tmp
=
0
;
...
...
@@ -1129,8 +1130,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
uint32_t
TBS
=
0
;
do
{
rbSize
++
;
TBS
=
nr_compute_tbs
(
nr_get_Qm_dl
(
nr_mac
->
sched_ctrlCommon
->
mcs
,
nr_mac
->
sched_ctrlCommon
->
mcsTableId
x
),
nr_get_code_rate_dl
(
nr_mac
->
sched_ctrlCommon
->
mcs
,
nr_mac
->
sched_ctrlCommon
->
mcsTableId
x
),
TBS
=
nr_compute_tbs
(
nr_get_Qm_dl
(
mcsIndex
,
mcsTableInde
x
),
nr_get_code_rate_dl
(
mcsIndex
,
mcsTableInde
x
),
rbSize
,
NrOfSymbols
,
N_PRB_DMRS
*
N_DMRS_SLOT
,
0
,
0
,
1
)
>>
3
;
}
while
(
rbStart
+
rbSize
<
BWPSize
&&
!
vrb_map
[
rbStart
+
rbSize
]
&&
TBS
<
mac_pdu_length
);
...
...
@@ -1212,10 +1213,10 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
pdsch_pdu_rel15
->
SubcarrierSpacing
=
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
;
pdsch_pdu_rel15
->
CyclicPrefix
=
0
;
pdsch_pdu_rel15
->
NrOfCodewords
=
1
;
pdsch_pdu_rel15
->
targetCodeRate
[
0
]
=
nr_get_code_rate_dl
(
mcsIndex
,
0
);
pdsch_pdu_rel15
->
targetCodeRate
[
0
]
=
nr_get_code_rate_dl
(
mcsIndex
,
mcsTableIndex
);
pdsch_pdu_rel15
->
qamModOrder
[
0
]
=
2
;
pdsch_pdu_rel15
->
mcsIndex
[
0
]
=
mcsIndex
;
/*
if (bwp->bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table == NULL) {
pdsch_pdu_rel15->mcsTable[0] = 0;
} else {
...
...
@@ -1225,6 +1226,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
pdsch_pdu_rel15->mcsTable[0] = 2;
}
}
*/
pdsch_pdu_rel15
->
rvIndex
[
0
]
=
0
;
pdsch_pdu_rel15
->
dataScramblingId
=
*
scc
->
physCellId
;
...
...
@@ -1311,8 +1314,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
x_Overhead
=
0
;
nr_get_tbs_dl
(
&
dl_tti_pdsch_pdu
->
pdsch_pdu
,
x_Overhead
,
pdsch_pdu_rel15
->
numDmrsCdmGrpsNoData
,
dci_payload
.
tb_scaling
);
const
int
cont_res_len
=
1
+
6
;
const
int
post_padding
=
TBS
>
mac_pdu_length
;
//LOG_I(NR_MAC, "Configuring DL_TX in %d.%d: TBS %d, header_length_total %d, sdu_length_total %d,cont_res_len %d, post_padding %d \n", frameP, slotP,
// TBS, header_length_total, payload_length, cont_res_len, post_padding);
...
...
@@ -1320,17 +1321,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// DL TX request
nfapi_nr_pdu_t
*
tx_req
=
&
nr_mac
->
TX_req
[
CC_id
].
pdu_list
[
nr_mac
->
TX_req
[
CC_id
].
Number_of_PDUs
];
if
(
post_padding
>
0
)
{
for
(
int
j
=
0
;
j
<
TBS
-
mac_pdu_length
;
j
++
)
mac_pdu
[
mac_pdu_length
+
j
]
=
0
;
}
mac_pdu_length
=
TBS
;
//bzero(tx_req->TLVs[0].value.direct,MAX_NR_DLSCH_PAYLOAD_BYTES);
memcpy
(
&
tx_req
->
TLVs
[
0
].
value
.
direct
,
mac_pdu
,
sizeof
(
uint8_t
)
*
mac_pdu_length
);
memcpy
(
&
tx_req
->
TLVs
[
0
].
value
.
direct
,
mac_pdu
,
sizeof
(
uint8_t
)
*
TBS
);
tx_req
->
PDU_length
=
TBS
;
tx_req
->
PDU_index
=
pduindex
;
tx_req
->
num_TLV
=
1
;
...
...
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