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
canghaiwuhen
OpenXG-RAN
Commits
ceef41f9
Commit
ceef41f9
authored
Nov 20, 2020
by
Chenyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ul&dl ok after msg3 is rcv
parent
be31d514
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
11 deletions
+47
-11
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+2
-2
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+2
-2
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+13
-4
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+2
-1
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+9
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+19
-0
No files found.
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
ceef41f9
...
...
@@ -659,7 +659,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
if
(
err_flag
==
1
)
{
//#if UE_DEBUG_TRACE
LOG_
D
(
PHY
,
"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d
\n
"
,
LOG_
I
(
PHY
,
"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d
\n
"
,
phy_vars_ue
->
Mod_id
,
frame
,
nr_tti_rx
,
harq_pid
,
harq_process
->
status
,
harq_process
->
round
,
harq_process
->
TBS
,
harq_process
->
mcs
,
Kr
,
r
,
harq_process
->
round
);
//#endif
harq_process
->
harq_ack
.
ack
=
0
;
...
...
@@ -682,7 +682,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
return
((
1
+
dlsch
->
max_ldpc_iterations
));
}
else
{
//#if UE_DEBUG_TRACE
LOG_
D
(
PHY
,
"[UE %d] DLSCH: Setting ACK for nr_tti_rx %d TBS %d mcs %d nb_rb %d harq_process->round %d
\n
"
,
LOG_
I
(
PHY
,
"[UE %d] DLSCH: Setting ACK for nr_tti_rx %d TBS %d mcs %d nb_rb %d harq_process->round %d
\n
"
,
phy_vars_ue
->
Mod_id
,
nr_tti_rx
,
harq_process
->
TBS
,
harq_process
->
mcs
,
harq_process
->
nb_rb
,
harq_process
->
round
);
//#endif
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
ceef41f9
...
...
@@ -253,7 +253,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
// if all segments are done
if
(
rdata
->
nbSegments
==
ulsch_harq
->
processedSegments
)
{
if
(
decodeSuccess
)
{
LOG_
D
(
PHY
,
"[gNB %d] ULSCH: Setting ACK for nr_tti_rx %d TBS %d
\n
"
,
LOG_
I
(
PHY
,
"[gNB %d] ULSCH: Setting ACK for nr_tti_rx %d TBS %d
\n
"
,
gNB
->
Mod_id
,
ulsch_harq
->
slot
,
ulsch_harq
->
TBS
);
ulsch_harq
->
status
=
SCH_IDLE
;
ulsch_harq
->
round
=
0
;
...
...
@@ -262,7 +262,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
LOG_D
(
PHY
,
"ULSCH received ok
\n
"
);
nr_fill_indication
(
gNB
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
rdata
->
ulsch_id
,
rdata
->
harq_pid
,
0
);
}
else
{
LOG_
D
(
PHY
,
"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d) r %d
\n
"
,
LOG_
I
(
PHY
,
"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d) r %d
\n
"
,
gNB
->
Mod_id
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
rdata
->
harq_pid
,
ulsch_harq
->
status
,
ulsch_harq
->
round
,
ulsch_harq
->
TBS
,
r
);
if
(
ulsch_harq
->
round
>=
ulsch
->
Mlimit
)
{
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
ceef41f9
...
...
@@ -416,6 +416,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
//NR_FrequencyInfoDL_t *frequencyInfoDL = scc->downlinkConfigCommon->frequencyInfoDL;
NR_RACH_ConfigDedicated_t
*
rach_ConfigDedicated
=
mac
->
rach_ConfigDedicated
;
int
prach_genarate
=
0
;
// int32_t frame_diff = 0;
uint8_t
sdu_lcids
[
NB_RB_MAX
]
=
{
0
};
...
...
@@ -510,8 +511,10 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
// Fill in preamble and PRACH resources
if
(
mac
->
generate_nr_prach
==
1
)
{
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
nr_tti_tx
,
prach_resources
,
prach_pdu
,
rach_ConfigDedicated
);
prach_genarate
=
1
;
}
offset
=
nr_generate_ulsch_pdu
((
uint8_t
*
)
mac_sdus
,
// sdus buffer
(
uint8_t
*
)
payload
,
// UL MAC pdu pointer
num_sdus
,
// num sdus
...
...
@@ -556,7 +559,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
// Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213)
// TbD Msg3 Retransmissions to be scheduled by DCI 0_0
mac
->
RA_active
=
0
;
//
mac->RA_active = 0;
mac
->
RA_window_cnt
=
-
1
;
mac
->
ra_state
=
RA_SUCCEEDED
;
mac
->
generate_nr_prach
=
2
;
...
...
@@ -637,8 +640,10 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
// Fill in preamble and PRACH resources
if
(
mac
->
generate_nr_prach
==
1
)
{
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
nr_tti_tx
,
prach_resources
,
prach_pdu
,
rach_ConfigDedicated
);
prach_genarate
=
1
;
}
}
else
{
mac
->
RA_window_cnt
--
;
...
...
@@ -651,7 +656,10 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
// Fill in preamble and PRACH resources
if
(
mac
->
generate_nr_prach
==
1
)
{
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
nr_tti_tx
,
prach_resources
,
prach_pdu
,
rach_ConfigDedicated
);
prach_genarate
=
1
;
}
}
}
...
...
@@ -659,7 +667,8 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
LOG_D
(
MAC
,
"[UE %d] FATAL: Should not have checked for RACH in PUSCH yet ..."
,
mod_id
);
AssertFatal
(
1
==
0
,
""
);
}
return
mac
->
generate_nr_prach
;
//return mac->generate_nr_prach;
return
prach_genarate
;
}
void
nr_get_RA_window
(
NR_UE_MAC_INST_t
*
mac
){
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
View file @
ceef41f9
...
...
@@ -287,7 +287,8 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
if
(
ss
->
searchSpaceType
->
choice
.
ue_Specific
){
if
(
ss
->
searchSpaceType
->
choice
.
ue_Specific
->
dci_Formats
==
NR_SearchSpace__searchSpaceType__ue_Specific__dci_Formats_formats0_1_And_1_1
){
// Monitors DCI 01 and 11 scrambled with C-RNTI, or CS-RNTI(s), or SP-CSI-RNTI
if
(
get_softmodem_params
()
->
phy_test
==
1
&&
mac
->
crnti
>
0
)
{
//if (get_softmodem_params()->phy_test == 1 && mac->crnti > 0) {
if
(((
mac
->
ra_state
==
RA_SUCCEEDED
)
||
(
get_softmodem_params
()
->
phy_test
==
1
))
&&
mac
->
crnti
>
0
){
LOG_D
(
MAC
,
"[DCI_CONFIG] Configure monitoring of PDCCH candidates in the user specific search space
\n
"
);
rel15
->
num_dci_options
=
2
;
rel15
->
dci_format_options
[
0
]
=
NR_DL_DCI_FORMAT_1_1
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
ceef41f9
...
...
@@ -1450,8 +1450,8 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
*/
}
}
else
if
(
ul_info
)
{
if
(
get_softmodem_params
()
->
phy_test
&&
ul_info
->
slot_tx
==
8
)
{
// ULSCH is handled only in phy-test mode (consistently with OAI gNB)
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
ul_info
->
module_id
);
if
(
((
get_softmodem_params
()
->
phy_test
)
||
((
mac
->
ra_state
==
RA_SUCCEEDED
))
)
&&
ul_info
->
slot_tx
==
8
)
{
// ULSCH is handled only in phy-test mode (consistently with OAI gNB)
uint8_t
nb_dmrs_re_per_rb
;
uint8_t
ulsch_input_buffer
[
MAX_ULSCH_PAYLOAD_BYTES
];
...
...
@@ -1488,6 +1488,13 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
uint8_t
nrOfLayers
=
1
;
uint8_t
mcs_index
=
ulcfg_pdu
->
pusch_config_pdu
.
mcs_index
;
uint8_t
mcs_table
=
ulcfg_pdu
->
pusch_config_pdu
.
mcs_table
;
rb_size
=
106
;
rb_start
=
0
;
nr_of_symbols
=
11
;
start_symbol_index
=
0
;
mcs_index
=
9
;
uint8_t
harq_process_id
=
ulcfg_pdu
->
pusch_config_pdu
.
pusch_data
.
harq_process_id
;
uint8_t
rv_index
=
ulcfg_pdu
->
pusch_config_pdu
.
pusch_data
.
rv_index
;
uint16_t
l_prime_mask
=
get_l_prime
(
nr_of_symbols
,
typeB
,
pusch_dmrs_pos0
,
pusch_len1
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
ceef41f9
...
...
@@ -498,6 +498,13 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
lcid
,
0
,
0
);
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
=
500
;
LOG_I
(
MAC
,
"%d.%d, DTCH%d->DLSCH, RLC status %d bytes
\n
"
,
frame
,
slot
,
lcid
,
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
);
sched_ctrl
->
num_total_bytes
+=
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
;
if
(
sched_ctrl
->
num_total_bytes
==
0
&&
!
sched_ctrl
->
ta_apply
)
/* If TA should be applied, give at least one RB */
...
...
@@ -742,6 +749,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
unsigned
char
sdu_lcids
[
NB_RB_MAX
]
=
{
0
};
const
int
lcid
=
DL_SCH_LCID_DTCH
;
if
(
sched_ctrl
->
num_total_bytes
>
0
)
{
#if 0
LOG_D(MAC,
"[gNB %d][USER-PLANE DEFAULT DRB] Frame %d : DTCH->DLSCH, Requesting "
"%d bytes from RLC (lcid %d total hdr len %d), TBS: %d \n \n",
...
...
@@ -775,6 +783,17 @@ void nr_schedule_ue_spec(module_id_t module_id,
header_length_last = 1 + 1 + (sdu_lengths[num_sdus] >= 128);
header_length_total += header_length_last;
num_sdus++;
#else
LOG_D
(
MAC
,
"Configuring DL_TX in %d.%d: random data
\n
"
,
frame
,
slot
);
for
(
int
i
=
0
;
i
<
TBS
;
i
++
)
mac_sdus
[
i
]
=
(
unsigned
char
)
(
lrand48
()
&
0xff
);
sdu_lcids
[
0
]
=
0x3f
;
// DRB
sdu_lengths
[
0
]
=
TBS
-
ta_len
-
3
;
header_length_total
+=
2
+
(
sdu_lengths
[
0
]
>=
128
);
sdu_length_total
+=
sdu_lengths
[
0
];
num_sdus
+=
1
;
#endif
}
else
if
(
get_softmodem_params
()
->
phy_test
)
{
LOG_D
(
MAC
,
"Configuring DL_TX in %d.%d: random data
\n
"
,
frame
,
slot
);
...
...
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