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
3f12410e
Commit
3f12410e
authored
Dec 03, 2020
by
Chenyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added msg4
parent
96a8c90e
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
959 additions
and
64 deletions
+959
-64
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+8
-2
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+1
-1
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+12
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+133
-9
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+2
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+464
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+3
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+2
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+289
-34
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+11
-6
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+33
-3
No files found.
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
3f12410e
...
...
@@ -341,6 +341,11 @@ void nr_ue_pbch_procedures(uint8_t gNB_id,
ue
->
UE_mode
[
gNB_id
]
=
PRACH
;
ue
->
prach_resources
[
gNB_id
]
->
sync_frame
=
frame_rx
;
ue
->
prach_resources
[
gNB_id
]
->
init_msg1
=
0
;
LOG_I
(
PHY
,
"[UE %d] frame %d, nr_tti_rx %d, outofsync, return to PRACH
\n
"
,
ue
->
Mod_id
,
frame_rx
,
nr_tti_rx
);
}
#ifdef DEBUG_PHY_PROC
...
...
@@ -782,8 +787,8 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
return
-
1
;
}
else
{
// This is to adjust the llr offset in the case of skipping over a dmrs symbol (i.e. in case of no PDSCH REs in DMRS)
if
(
pdsch
==
RA_PDSCH
)
ue
->
pdsch_vars
[
ue
->
current_thread_id
[
nr_tti_rx
]][
eNB_id
]
->
llr_offset
[
m
]
=
ue
->
pdsch_vars
[
ue
->
current_thread_id
[
nr_tti_rx
]][
eNB_id
]
->
llr_offset
[
m
-
1
];
else
if
(
pdsch
==
PDSCH
)
{
if
(
dlsch0
->
harq_processes
[
harq_pid
]
->
n_dmrs_cdm_groups
==
2
)
ue
->
pdsch_vars
[
ue
->
current_thread_id
[
nr_tti_rx
]][
eNB_id
]
->
llr_offset
[
m
]
=
ue
->
pdsch_vars
[
ue
->
current_thread_id
[
nr_tti_rx
]][
eNB_id
]
->
llr_offset
[
m
-
1
];
else
if
(
dlsch0
->
harq_processes
[
harq_pid
]
->
n_dmrs_cdm_groups
==
1
)
{
if
(
nr_rx_pdsch
(
ue
,
pdsch
,
eNB_id
,
...
...
@@ -814,6 +819,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
proc
->
first_symbol_available
=
1
;
}
}
// CRNTI active
}
return
0
;
}
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
3f12410e
...
...
@@ -561,7 +561,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
// TbD Msg3 Retransmissions to be scheduled by DCI 0_0
//mac->RA_active = 0;
mac
->
RA_window_cnt
=
-
1
;
mac
->
ra_state
=
RA_SUCCEEDED
;
mac
->
ra_state
=
WAIT_CONTENTION_RESOLUTION
;
mac
->
generate_nr_prach
=
2
;
LOG_I
(
MAC
,
"[MAC][UE %d][RAPROC]: RAR successfully received
\n
"
,
mod_id
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
View file @
3f12410e
...
...
@@ -141,6 +141,14 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
case
NR_RNTI_CS
:
break
;
case
NR_RNTI_TC
:
// we use the initial DL BWP
sps
=
initialDownlinkBWP
->
genericParameters
.
cyclicPrefix
==
NULL
?
14
:
12
;
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
rel15
->
rnti
=
mac
->
t_crnti
;
rel15
->
BWPSize
=
NRRIV2BW
(
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
275
);
rel15
->
BWPStart
=
NRRIV2PRBOFFSET
(
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
rel15
->
SubcarrierSpacing
=
initialDownlinkBWP
->
genericParameters
.
subcarrierSpacing
;
rel15
->
dci_length_options
[
0
]
=
nr_dci_size
(
scc
,
mac
->
scg
,
def_dci_pdu_rel15
,
rel15
->
dci_format_options
[
0
],
NR_RNTI_TC
,
rel15
->
BWPSize
,
bwp_id
);
break
;
case
NR_RNTI_SP_CSI
:
break
;
...
...
@@ -223,6 +231,10 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
break
;
case
WAIT_CONTENTION_RESOLUTION
:
rel15
->
rnti
=
mac
->
t_crnti
;
rel15
->
num_dci_options
=
1
;
rel15
->
dci_format_options
[
0
]
=
NR_DL_DCI_FORMAT_1_0
;
config_dci_pdu
(
mac
,
rel15
,
dl_config
,
NR_RNTI_TC
,
ss_id
);
fill_dci_search_candidates
(
ss
,
rel15
);
break
;
default:
break
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
3f12410e
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
3f12410e
...
...
@@ -366,7 +366,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
;
if
(
add_ue
==
1
&&
get_softmodem_params
()
->
phy_test
)
{
const
int
UE_id
=
add_new_nr_ue
(
Mod_idP
,
rnti
);
const
int
UE_id
=
add_new_nr_ue
(
Mod_idP
,
rnti
,
1
);
UE_info
->
secondaryCellGroup
[
UE_id
]
=
secondaryCellGroup
;
compute_csi_bitlen
(
secondaryCellGroup
,
UE_info
,
UE_id
);
struct
NR_ServingCellConfig__downlinkBWP_ToAddModList
*
bwpList
=
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
3f12410e
...
...
@@ -506,7 +506,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
// Otherwise already consider 5G already connected
RC
.
nrmac
[
module_idP
]
->
current_slot
=
slot
;
if
(
get_softmodem_params
()
->
phy_test
==
0
)
{
nr_schedule_RA
(
module_idP
,
frame
,
slot
);
nr_schedule_RA
(
module_idP
,
frame
,
slot
,
num_slots_per_tdd
);
nr_schedule_reception_msg3
(
module_idP
,
0
,
frame
,
slot
);
}
...
...
@@ -525,7 +525,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
if
(
UE_info
->
active
[
UE_id
]
&&
(
is_xlsch_in_slot
(
dlsch_in_slot_bitmap
,
slot
%
num_slots_per_tdd
))
&&
slot
<
10
&&
slot
==
2
)
{
&&
slot
<
10
&&
slot
==
1
)
{
ue_sched_ctl
->
current_harq_pid
=
slot
%
num_slots_per_tdd
;
nr_schedule_ue_spec
(
module_idP
,
frame
,
slot
,
num_slots_per_tdd
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
3f12410e
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
3f12410e
...
...
@@ -549,7 +549,8 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
slot
,
num_slots_per_tdd
,
&
sched_ctrl
->
pucch_sched_idx
,
&
sched_ctrl
->
pucch_occ_idx
);
&
sched_ctrl
->
pucch_occ_idx
,
1
);
AssertFatal
(
sched_ctrl
->
pucch_sched_idx
>=
0
,
"no uplink slot for PUCCH found!
\n
"
);
...
...
@@ -620,6 +621,7 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
1
/* nrOfLayers */
)
>>
3
;
}
while
(
rbStart
+
rbSize
<
bwpSize
&&
!
vrb_map
[
rbStart
+
rbSize
]
&&
TBS
<
sched_ctrl
->
num_total_bytes
);
sched_ctrl
->
rbSize
=
rbSize
;
sched_ctrl
->
rbStart
=
rbStart
;
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
3f12410e
...
...
@@ -337,7 +337,8 @@ void nr_preprocessor_phytest(module_id_t module_id,
slot
,
num_slots_per_tdd
,
&
sched_ctrl
->
pucch_sched_idx
,
&
sched_ctrl
->
pucch_occ_idx
);
&
sched_ctrl
->
pucch_occ_idx
,
1
);
AssertFatal
(
sched_ctrl
->
pucch_sched_idx
>=
0
,
"no uplink slot for PUCCH found!
\n
"
);
sched_ctrl
->
rbStart
=
rbStart
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
3f12410e
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
3f12410e
...
...
@@ -387,7 +387,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
current_rnti
);
continue
;
}
const
int
UE_id
=
add_new_nr_ue
(
gnb_mod_idP
,
ra
->
rnti
);
const
int
UE_id
=
add_new_nr_ue
(
gnb_mod_idP
,
ra
->
rnti
,
0
);
UE_info
->
secondaryCellGroup
[
UE_id
]
=
ra
->
secondaryCellGroup
;
compute_csi_bitlen
(
ra
->
secondaryCellGroup
,
UE_info
,
UE_id
);
UE_info
->
UE_beam_index
[
UE_id
]
=
ra
->
beam_id
;
...
...
@@ -408,11 +408,16 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
UE_info
->
UE_sched_ctrl
[
UE_id
].
ta_frame
=
frameP
;
free
(
ra
->
preambles
.
preamble_list
);
ra
->
state
=
RA_IDLE
;
LOG_I
(
MAC
,
"reset RA state information for RA-RNTI %04x/index %d
\n
"
,
ra
->
rnti
,
i
);
//ra->state = RA_IDLE;
// LOG_I(MAC,
// "reset RA state information for RA-RNTI %04x/index %d\n",
// ra->rnti,
// i);
//ra->state = RA_IDLE;
ra
->
state
=
Msg4
;
ra
->
Msg4_frame
=
(
frameP
+
2
)
%
1024
;
ra
->
Msg4_slot
=
1
;
LOG_I
(
MAC
,
"set RA state to Msg4 for RA-RNTI %04x, msg4 frame %d %d
\n
"
,
ra
->
rnti
,
ra
->
Msg4_frame
,
ra
->
Msg4_slot
);
return
;
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
3f12410e
...
...
@@ -90,7 +90,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subfram
/////// Random Access MAC-PHY interface functions and primitives ///////
void
nr_schedule_RA
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
slotP
);
void
nr_schedule_RA
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
slotP
,
int
num_slots_per_tdds
);
/* \brief Function to indicate a received preamble on PRACH. It initiates the RA procedure.
@param module_idP Instance ID of gNB
...
...
@@ -141,6 +141,33 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
frame_t
frameP
,
sub_frame_t
subframeP
);
void
nr_fill_nfapi_dl_pdu_common
(
int
Mod_idP
,
int
UE_id
,
int
bwp_id
,
NR_SearchSpace_t
*
ss
,
NR_ControlResourceSet_t
*
coreset
,
nfapi_nr_dl_tti_request_body_t
*
dl_req
,
NR_sched_pucch
*
pucch_sched
,
int
nrOfLayers
,
uint8_t
mcs
,
uint16_t
rbSize
,
uint16_t
rbStart
,
uint8_t
numDmrsCdmGrpsNoData
,
nfapi_nr_dmrs_type_e
dmrsConfigType
,
uint8_t
table_idx
,
uint16_t
R
,
uint8_t
Qm
,
uint32_t
TBS
,
int
time_domain_assignment
,
int
StartSymbolIndex
,
int
NrOfSymbols
,
uint8_t
aggregation_level
,
int
CCEIndex
,
int
harq_pid
,
int
ndi
,
int
round
);
void
nr_fill_nfapi_dl_pdu
(
int
Mod_id
,
nfapi_nr_dl_tti_request_body_t
*
dl_req
,
rnti_t
rnti
,
...
...
@@ -197,7 +224,8 @@ void nr_acknack_scheduling(int Mod_idP,
sub_frame_t
slotP
,
int
slots_per_tdd
,
int
*
pucch_id
,
int
*
pucch_occ
);
int
*
pucch_occ
,
int
isUEspec
);
int
get_pucch_resource
(
NR_UE_info_t
*
UE_info
,
int
UE_id
,
int
k
,
int
l
);
...
...
@@ -303,9 +331,11 @@ void add_nr_ue_list(NR_UE_list_t *listP, int UE_id);
int
find_nr_UE_id
(
module_id_t
mod_idP
,
rnti_t
rntiP
);
int
find_nr_UE_id_msg4
(
module_id_t
mod_idP
,
rnti_t
rntiP
);
int
find_nr_RA_id
(
module_id_t
mod_idP
,
int
CC_idP
,
rnti_t
rntiP
);
int
add_new_nr_ue
(
module_id_t
mod_idP
,
rnti_t
rntiP
);
int
add_new_nr_ue
(
module_id_t
mod_idP
,
rnti_t
rntiP
,
int
isActive
);
void
mac_remove_nr_ue
(
module_id_t
mod_id
,
rnti_t
rnti
);
...
...
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