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
wangjie
OpenXG-RAN
Commits
496588dd
Commit
496588dd
authored
Jan 12, 2021
by
Sakthivel Velumani
Committed by
Robert Schmidt
Mar 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add cmd line options for DL&UL phytest scheduling
Add parameters: MCS, Bandwidth (in PRBs), slot scheduling bitmap
parent
b6fef955
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
29 deletions
+46
-29
executables/nr-softmodem-common.h
executables/nr-softmodem-common.h
+6
-2
executables/nr-softmodem.c
executables/nr-softmodem.c
+0
-2
executables/nr-softmodem.h
executables/nr-softmodem.h
+12
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+1
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+27
-23
No files found.
executables/nr-softmodem-common.h
View file @
496588dd
...
...
@@ -68,11 +68,15 @@
#define CONFIG_HLP_SOFTS "Enable soft scope and L1 and L2 stats (Xforms)\n"
#define CONFIG_HLP_EXMCAL "Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n"
#define CONFIG_HLP_ITTIL "Generate ITTI analyzser logs (similar to wireshark logs but with more details)\n"
#define CONFIG_HLP_DLMCS
"Set the maximum downlink MCS
\n"
#define CONFIG_HLP_DLMCS
_PHYTEST "Set the downlink MCS for PHYTEST mode
\n"
#define CONFIG_HLP_STMON "Enable processing timing measurement of lte softmodem on per subframe basis \n"
#define CONFIG_HLP_PRB "Set the PRB, valid values: 6, 25, 50, 100 \n"
#define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \n"
#define CONFIG_HLP_ULMCS "Set the maximum uplink MCS\n"
#define CONFIG_HLP_ULMCS_PHYTEST "Set the uplink MCS for PHYTEST mode\n"
#define CONFIG_HLP_DLBW_PHYTEST "Set the downlink banwdwidth (in PRBs) for PHYTEST mode\n"
#define CONFIG_HLP_ULBW_PHYTEST "Set the uplink banwdwidth (in PRBs) for PHYTEST mode\n"
#define CONFIG_HLP_DLBM_PHYTEST "Bitmap for DLSCH slots (slot 0 starts at LSB)\n"
#define CONFIG_HLP_ULBM_PHYTEST "Bitmap for ULSCH slots (slot 0 starts at LSB)\n"
#define CONFIG_HLP_TDD "Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n"
#define CONFIG_HLP_UE "Set the lte softmodem as a UE\n"
#define CONFIG_HLP_L2MONW "Enable L2 wireshark messages on localhost \n"
...
...
executables/nr-softmodem.c
View file @
496588dd
...
...
@@ -160,8 +160,6 @@ int otg_enabled;
//static NR_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs];
//static nfapi_nr_config_request_t *config[MAX_NUM_CCs];
uint32_t
target_dl_mcs
=
28
;
//maximum allowed mcs
uint32_t
target_ul_mcs
=
20
;
uint32_t
timing_advance
=
0
;
uint64_t
num_missed_slots
=
0
;
// counter for the number of missed slots
...
...
executables/nr-softmodem.h
View file @
496588dd
...
...
@@ -23,14 +23,24 @@
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \
{"K" , CONFIG_HLP_ITTIL, PARAMFLAG_NOFREE, strptr:&itti_dump_file, defstrval:"/tmp/itti.dump", TYPE_STRING, 0}, \
{"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
{"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
{"m" , CONFIG_HLP_DLMCS_PHYTEST,0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
{"t" , CONFIG_HLP_ULMCS_PHYTEST,0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
{"M" , CONFIG_HLP_DLBW_PHYTEST,0, uptr:&target_dl_bw, defintval:0, TYPE_UINT, 0}, \
{"T" , CONFIG_HLP_ULBW_PHYTEST,0, uptr:&target_ul_bw, defintval:0, TYPE_UINT, 0}, \
{"D" , CONFIG_HLP_DLBM_PHYTEST,0, u64ptr:&dlsch_slot_bitmap, defintval:0, TYPE_UINT64, 0}, \
{"U" , CONFIG_HLP_ULBM_PHYTEST,0, u64ptr:&ulsch_slot_bitmap, defintval:0, TYPE_UINT64, 0}, \
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \
{"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
}
#include "threads_t.h"
extern
threads_t
threads
;
extern
uint32_t
target_dl_mcs
;
extern
uint32_t
target_ul_mcs
;
extern
uint32_t
target_dl_bw
;
extern
uint32_t
target_ul_bw
;
extern
uint64_t
dlsch_slot_bitmap
;
extern
uint64_t
ulsch_slot_bitmap
;
// In nr-gnb.c
extern
void
init_gNB
(
int
single_thread_flag
,
int
wait_for_sync
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
496588dd
...
...
@@ -53,6 +53,7 @@
#include "executables/softmodem-common.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "executables/nr-softmodem.h"
uint16_t
nr_pdcch_order_table
[
6
]
=
{
31
,
31
,
511
,
2047
,
2047
,
8191
};
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
496588dd
...
...
@@ -256,12 +256,15 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
extern
int
getNrOfSymbols
(
NR_BWP_Downlink_t
*
bwp
,
int
tda
);
extern
uint8_t
getN_PRB_DMRS
(
NR_BWP_Downlink_t
*
bwp
,
int
numDmrsCdmGrpsNoData
);
uint32_t
target_dl_mcs
=
9
;
uint32_t
target_dl_bw
=
50
;
uint64_t
dlsch_slot_bitmap
=
(
1
<<
1
);
/* schedules whole bandwidth for first user, all the time */
void
nr_preprocessor_phytest
(
module_id_t
module_id
,
frame_t
frame
,
sub_frame_t
slot
)
{
if
(
slot
!=
1
)
if
(
!
is_xlsch_in_slot
(
dlsch_slot_bitmap
,
slot
)
)
return
;
const
int
CC_id
=
0
;
const
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
module_id
]
->
common_channels
[
CC_id
].
ServingCellConfigCommon
;
...
...
@@ -275,24 +278,25 @@ void nr_preprocessor_phytest(module_id_t module_id,
/* find largest unallocated chunk */
const
int
bwpSize
=
NRRIV2BW
(
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
int
rbStart
=
0
;
int
tStart
=
0
;
int
rbSize
=
0
;
uint16_t
*
vrb_map
=
RC
.
nrmac
[
module_id
]
->
common_channels
[
CC_id
].
vrb_map
;
/*
find largest unallocated RB regio
n */
do
{
/*
loop ensures that we allocate exactly target_dl_bw, or retur
n */
while
(
true
)
{
/* advance to first free RB */
while
(
tStart
<
bwpSize
&&
vrb_map
[
tStart
])
tStart
++
;
/* find maximum rbSize at current rbStart */
int
tSize
=
1
;
while
(
tStart
+
tSize
<
bwpSize
&&
!
vrb_map
[
tStart
+
tSize
])
tSize
++
;
if
(
tSize
>
rbSize
)
{
rbStart
=
tStart
;
rbSize
=
tSize
;
}
tStart
+=
tSize
;
}
while
(
tStart
<
bwpSize
);
while
(
rbStart
<
bwpSize
&&
vrb_map
[
rbStart
])
rbStart
++
;
rbSize
=
1
;
/* iterate until we are at target_dl_bw or no available RBs */
while
(
rbStart
+
rbSize
<
bwpSize
&&
!
vrb_map
[
rbStart
+
rbSize
]
&&
rbSize
<
target_dl_bw
)
rbSize
++
;
/* found target_dl_bw? */
if
(
rbSize
==
target_dl_bw
)
break
;
/* at end and below target_dl_bw? */
if
(
rbStart
+
rbSize
>=
bwpSize
)
return
;
rbStart
+=
rbSize
;
}
sched_ctrl
->
num_total_bytes
=
0
;
const
int
lcid
=
DL_SCH_LCID_DTCH
;
...
...
@@ -366,7 +370,7 @@ void nr_preprocessor_phytest(module_id_t module_id,
else
sched_pdsch
->
mcsTableIdx
=
2
;
}
sched_pdsch
->
mcs
=
9
;
sched_pdsch
->
mcs
=
target_dl_mcs
;
sched_pdsch
->
numDmrsCdmGrpsNoData
=
1
;
sched_pdsch
->
Qm
=
nr_get_Qm_dl
(
sched_pdsch
->
mcs
,
sched_pdsch
->
mcsTableIdx
);
sched_pdsch
->
R
=
nr_get_code_rate_dl
(
sched_pdsch
->
mcs
,
sched_pdsch
->
mcsTableIdx
);
...
...
@@ -392,6 +396,9 @@ void nr_preprocessor_phytest(module_id_t module_id,
vrb_map
[
rb
+
sched_pdsch
->
rbStart
]
=
1
;
}
uint32_t
target_ul_mcs
=
9
;
uint32_t
target_ul_bw
=
50
;
uint64_t
ulsch_slot_bitmap
=
(
1
<<
8
);
bool
nr_ul_preprocessor_phytest
(
module_id_t
module_id
,
frame_t
frame
,
sub_frame_t
slot
,
...
...
@@ -427,14 +434,11 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id,
/* check if slot is UL, and that slot is 8 (assuming K2=6 because of UE
* limitations). Note that if K2 or the TDD configuration is changed, below
* conditions might exclude each other and never be true */
if
(
!
(
is_xlsch_in_slot
(
ulsch_in_slot_bitmap
,
sched_slot
)
&&
sched_slot
==
8
))
if
(
!
is_xlsch_in_slot
(
ulsch_slot_bitmap
,
sched_slot
))
return
false
;
const
int
bw
=
NRRIV2BW
(
sched_ctrl
->
active_ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
uint16_t
rbStart
=
0
;
uint16_t
rbSize
=
50
;
/* due to OAI UE limitations */
if
(
rbSize
>
bw
)
rbSize
=
bw
;
uint16_t
rbSize
=
target_ul_bw
;
uint16_t
*
vrb_map_UL
=
&
RC
.
nrmac
[
module_id
]
->
common_channels
[
CC_id
].
vrb_map_UL
[
sched_slot
*
MAX_BWP_SIZE
];
...
...
@@ -495,7 +499,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id,
num_dmrs_cdm_grps_no_data
,
ps
);
const
int
mcs
=
9
;
const
int
mcs
=
target_ul_mcs
;
NR_sched_pusch_t
*
sched_pusch
=
&
sched_ctrl
->
sched_pusch
;
sched_pusch
->
mcs
=
mcs
;
sched_pusch
->
rbStart
=
rbStart
;
...
...
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