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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
69507efa
Commit
69507efa
authored
Nov 30, 2022
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix printing help message
parent
accf69ec
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
77 deletions
+53
-77
executables/nr-ue.c
executables/nr-ue.c
+2
-2
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+20
-39
executables/nr-uesoftmodem.h
executables/nr-uesoftmodem.h
+31
-33
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+0
-3
No files found.
executables/nr-ue.c
View file @
69507efa
...
...
@@ -448,7 +448,7 @@ static void UE_synch(void *arg) {
break;
*/
case
pbch
:
LOG_I
(
PHY
,
"[UE thread Synch] Running Initial Synch
(mode %d)
\n
"
,
UE
->
mode
);
LOG_I
(
PHY
,
"[UE thread Synch] Running Initial Synch
\n
"
);
uint64_t
dl_carrier
,
ul_carrier
;
nr_get_carrier_frequencies
(
UE
,
&
dl_carrier
,
&
ul_carrier
);
...
...
@@ -686,7 +686,7 @@ void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp, bool toTrash)
void
syncInFrame
(
PHY_VARS_NR_UE
*
UE
,
openair0_timestamp
*
timestamp
)
{
LOG_I
(
PHY
,
"Resynchronizing RX by %d samples
(mode = %d)
\n
"
,
UE
->
rx_offset
,
UE
->
mode
);
LOG_I
(
PHY
,
"Resynchronizing RX by %d samples
\n
"
,
UE
->
rx_offset
);
if
(
IS_SOFTMODEM_IQPLAYER
||
IS_SOFTMODEM_IQRECORDER
)
{
// Resynchonize by slot (will work with numerology 1 only)
...
...
executables/nr-uesoftmodem.c
View file @
69507efa
...
...
@@ -257,7 +257,6 @@ static void get_options(void) {
paramdef_t
cmdline_params
[]
=
CMDLINE_NRUEPARAMS_DESC
;
int
numparams
=
sizeof
(
cmdline_params
)
/
sizeof
(
paramdef_t
);
config_get
(
cmdline_params
,
numparams
,
NULL
);
config_process_cmdline
(
cmdline_params
,
numparams
,
NULL
);
if
(
vcdflag
>
0
)
ouput_vcd
=
1
;
...
...
@@ -265,38 +264,7 @@ static void get_options(void) {
// set PHY vars from command line
void
set_options
(
int
CC_id
,
PHY_VARS_NR_UE
*
UE
){
NR_DL_FRAME_PARMS
*
fp
=
&
UE
->
frame_parms
;
paramdef_t
cmdline_params
[]
=
CMDLINE_NRUE_PHYPARAMS_DESC
;
int
numparams
=
sizeof
(
cmdline_params
)
/
sizeof
(
paramdef_t
);
UE
->
mode
=
normal_txrx
;
config_get
(
cmdline_params
,
numparams
,
NULL
);
int
pindex
=
config_paramidx_fromname
(
cmdline_params
,
numparams
,
CALIBRX_OPT
);
if
(
(
cmdline_params
[
pindex
].
paramflags
&
PARAMFLAG_PARAMSET
)
!=
0
)
UE
->
mode
=
rx_calib_ue
;
pindex
=
config_paramidx_fromname
(
cmdline_params
,
numparams
,
CALIBRXMED_OPT
);
if
(
(
cmdline_params
[
pindex
].
paramflags
&
PARAMFLAG_PARAMSET
)
!=
0
)
UE
->
mode
=
rx_calib_ue_med
;
pindex
=
config_paramidx_fromname
(
cmdline_params
,
numparams
,
CALIBRXBYP_OPT
);
if
(
(
cmdline_params
[
pindex
].
paramflags
&
PARAMFLAG_PARAMSET
)
!=
0
)
UE
->
mode
=
rx_calib_ue_byp
;
pindex
=
config_paramidx_fromname
(
cmdline_params
,
numparams
,
DBGPRACH_OPT
);
if
(
cmdline_params
[
pindex
].
uptr
)
if
(
*
(
cmdline_params
[
pindex
].
uptr
)
>
0
)
UE
->
mode
=
debug_prach
;
pindex
=
config_paramidx_fromname
(
cmdline_params
,
numparams
,
NOL2CONNECT_OPT
);
if
(
cmdline_params
[
pindex
].
uptr
)
if
(
*
(
cmdline_params
[
pindex
].
uptr
)
>
0
)
UE
->
mode
=
no_L2_connect
;
pindex
=
config_paramidx_fromname
(
cmdline_params
,
numparams
,
CALIBPRACH_OPT
);
if
(
cmdline_params
[
pindex
].
uptr
)
if
(
*
(
cmdline_params
[
pindex
].
uptr
)
>
0
)
UE
->
mode
=
calib_prach_tx
;
pindex
=
config_paramidx_fromname
(
cmdline_params
,
numparams
,
DUMPFRAME_OPT
);
if
((
cmdline_params
[
pindex
].
paramflags
&
PARAMFLAG_PARAMSET
)
!=
0
)
UE
->
mode
=
rx_dump_frame
;
NR_DL_FRAME_PARMS
*
fp
=
&
UE
->
frame_parms
;
// Init power variables
tx_max_power
[
CC_id
]
=
tx_max_power
[
0
];
...
...
@@ -309,9 +277,18 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){
UE
->
tx_power_max_dBm
=
tx_max_power
[
CC_id
];
UE
->
rf_map
.
card
=
card_offset
;
UE
->
rf_map
.
chain
=
CC_id
+
chain_offset
;
LOG_I
(
PHY
,
"Set UE mode %d, UE_fo_compensation %d, UE_scan_carrier %d, UE_no_timing_correction %d
\n
, chest-freq %d
\n
"
,
UE
->
mode
,
UE
->
UE_fo_compensation
,
UE
->
UE_scan_carrier
,
UE
->
no_timing_correction
,
UE
->
chest_freq
);
UE
->
max_ldpc_iterations
=
nrUE_params
.
max_ldpc_iterations
;
UE
->
UE_scan_carrier
=
nrUE_params
.
UE_scan_carrier
;
UE
->
UE_fo_compensation
=
nrUE_params
.
UE_fo_compensation
;
UE
->
if_freq
=
nrUE_params
.
if_freq
;
UE
->
if_freq_off
=
nrUE_params
.
if_freq_off
;
UE
->
chest_freq
=
nrUE_params
.
chest_freq
;
UE
->
chest_time
=
nrUE_params
.
chest_time
;
UE
->
no_timing_correction
=
nrUE_params
.
no_timing_correction
;
UE
->
timing_advance
=
nrUE_params
.
timing_advance
;
LOG_I
(
PHY
,
"Set UE_fo_compensation %d, UE_scan_carrier %d, UE_no_timing_correction %d
\n
, chest-freq %d, chest-time %d
\n
"
,
UE
->
UE_fo_compensation
,
UE
->
UE_scan_carrier
,
UE
->
no_timing_correction
,
UE
->
chest_freq
,
UE
->
chest_time
);
// Set FP variables
...
...
@@ -320,10 +297,14 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){
LOG_I
(
PHY
,
"Set UE frame_type %d
\n
"
,
fp
->
frame_type
);
}
LOG_I
(
PHY
,
"Set UE nb_rx_antenna %d, nb_tx_antenna %d, threequarter_fs %d, ssb_start_subcarrier %d
\n
"
,
fp
->
nb_antennas_rx
,
fp
->
nb_antennas_tx
,
fp
->
threequarter_fs
,
fp
->
ssb_start_subcarrier
);
fp
->
nb_antennas_rx
=
nrUE_params
.
nb_antennas_rx
;
fp
->
nb_antennas_tx
=
nrUE_params
.
nb_antennas_tx
;
fp
->
threequarter_fs
=
nrUE_params
.
threequarter_fs
;
fp
->
N_RB_DL
=
nrUE_params
.
N_RB_DL
;
fp
->
ssb_start_subcarrier
=
nrUE_params
.
ssb_start_subcarrier
;
fp
->
ofdm_offset_divisor
=
nrUE_params
.
ofdm_offset_divisor
;
fp
->
ofdm_offset_divisor
=
nrUE_params
.
ofdm_offset_divisor
;
UE
->
max_ldpc_iterations
=
nrUE_params
.
max_ldpc_iterations
;
LOG_I
(
PHY
,
"Set UE nb_rx_antenna %d, nb_tx_antenna %d, threequarter_fs %d, ssb_start_subcarrier %d
\n
"
,
fp
->
nb_antennas_rx
,
fp
->
nb_antennas_tx
,
fp
->
threequarter_fs
,
fp
->
ssb_start_subcarrier
);
}
...
...
executables/nr-uesoftmodem.h
View file @
69507efa
...
...
@@ -35,53 +35,51 @@
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
{"dlsch-parallel", CONFIG_HLP_DLSCH_PARA, 0, u8ptr:NULL, defintval:0, TYPE_UINT8, 0}, \
{"offset-divisor", CONFIG_HLP_OFFSET_DIV, 0, uptr:&nrUE_params.ofdm_offset_divisor, defuintval:8, TYPE_UINT32, 0}, \
{"max-ldpc-iterations", CONFIG_HLP_MAX_LDPC_ITERATIONS, 0,
u8ptr:&nrUE_params.max_ldpc_iterations, defuintval:5, TYPE_UINT8
, 0}, \
{"max-ldpc-iterations", CONFIG_HLP_MAX_LDPC_ITERATIONS, 0,
iptr:&nrUE_params.max_ldpc_iterations, defuintval:5, TYPE_INT
, 0}, \
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \
{"uecap_file", CONFIG_HLP_UECAP_FILE, 0, strptr:&uecap_file, defstrval:"./uecap_ports1.xml", TYPE_STRING, 0}, \
{"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH,0, strptr:&rrc_config_path, defstrval:"./", TYPE_STRING, 0}, \
{"ue-idx-standalone", NULL, 0, u16ptr:&ue_idx_standalone, defuintval:0xFFFF, TYPE_UINT16, 0} \
}
/*------------------------------------------------------------------------------------------------------------------------------------------*/
/* command line parameters defining UE running mode */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_NRUE_PHYPARAMS_DESC { \
{ CALIBRX_OPT, CONFIG_HLP_CALUER, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \
{ CALIBRXMED_OPT, CONFIG_HLP_CALUERM, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \
{ CALIBRXBYP_OPT, CONFIG_HLP_CALUERB, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \
{ DBGPRACH_OPT, CONFIG_HLP_DBGUEPR, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \
{ NOL2CONNECT_OPT, CONFIG_HLP_NOL2CN, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \
{ CALIBPRACH_OPT, CONFIG_HLP_CALPRACH, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \
{ DUMPFRAME_OPT, CONFIG_HLP_DUMPFRAME, PARAMFLAG_BOOL, iptr:&dumpframe, defintval:0, TYPE_INT, 0}, \
{"uecap_file", CONFIG_HLP_UECAP_FILE, 0, strptr:&uecap_file, defstrval:"./uecap.xml", TYPE_STRING, 0}, \
{"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH,0, strptr:&rrc_config_path, defstrval:"./", TYPE_STRING, 0}, \
{"ue-idx-standalone", NULL, 0, u16ptr:&ue_idx_standalone, defuintval:0xFFFF, TYPE_UINT16, 0}, \
{"ue-rxgain", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:110, TYPE_DOUBLE,0}, \
{"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, dblptr:&rx_gain_off, defdblval:0, TYPE_DOUBLE,0}, \
{"ue-txgain", CONFIG_HLP_UETXG, 0, dblptr:&(tx_gain[0][0]), defdblval:0, TYPE_DOUBLE,0}, \
{"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0,
u8ptr:&(fp->nb_antennas_rx), defuintval:1, TYPE_UINT8
, 0}, \
{"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0,
u8ptr:&(fp->nb_antennas_tx), defuintval:1, TYPE_UINT8
, 0}, \
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&(
UE->
UE_scan_carrier), defintval:0, TYPE_INT, 0}, \
{"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, iptr:&(
UE->
UE_fo_compensation), defintval:0, TYPE_INT, 0}, \
{"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0,
iptr:&(nrUE_params.nb_antennas_rx), defuintval:1, TYPE_INT
, 0}, \
{"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0,
iptr:&(nrUE_params.nb_antennas_tx), defuintval:1, TYPE_INT
, 0}, \
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&(
nrUE_params.
UE_scan_carrier), defintval:0, TYPE_INT, 0}, \
{"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, iptr:&(
nrUE_params.
UE_fo_compensation), defintval:0, TYPE_INT, 0}, \
{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \
{"A" , CONFIG_HLP_TADV, 0, iptr:&(
UE->
timing_advance), defintval:0, TYPE_INT, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL,
u8ptr:&(fp->threequarter_fs), defintval:0, TYPE_UINT8
, 0}, \
{"r" , CONFIG_HLP_PRB_SA, 0, iptr:&(
fp->N_RB_DL), defintval:106, TYPE_U
INT, 0}, \
{"ssb", CONFIG_HLP_SSC, 0,
u16ptr:&(fp->ssb_start_subcarrier), defintval:516, TYPE_UINT16
,0}, \
{"A" , CONFIG_HLP_TADV, 0, iptr:&(
nrUE_params.
timing_advance), defintval:0, TYPE_INT, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL,
iptr:&(nrUE_params.threequarter_fs), defintval:0, TYPE_INT
, 0}, \
{"r" , CONFIG_HLP_PRB_SA, 0, iptr:&(
nrUE_params.N_RB_DL), defintval:106, TYPE_
INT, 0}, \
{"ssb", CONFIG_HLP_SSC, 0,
iptr:&(nrUE_params.ssb_start_subcarrier), defintval:516, TYPE_INT
,0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"if_freq" , CONFIG_HLP_IF_FREQ, 0, u64ptr:&(
UE->
if_freq), defuintval:0, TYPE_UINT64,0}, \
{"if_freq_off" , CONFIG_HLP_IF_FREQ_OFF, 0, iptr:&(
UE->
if_freq_off), defuintval:0, TYPE_INT, 0}, \
{"chest-freq", CONFIG_HLP_CHESTFREQ, 0, iptr:&(
UE->
chest_freq), defintval:0, TYPE_INT, 0}, \
{"chest-time", CONFIG_HLP_CHESTTIME, 0, iptr:&(
UE->
chest_time), defintval:0, TYPE_INT, 0}, \
{"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, iptr:&(
UE->no_timing_correction), defintval:0, TYPE_INT, 0},
\
{"if_freq" , CONFIG_HLP_IF_FREQ, 0, u64ptr:&(
nrUE_params.
if_freq), defuintval:0, TYPE_UINT64,0}, \
{"if_freq_off" , CONFIG_HLP_IF_FREQ_OFF, 0, iptr:&(
nrUE_params.
if_freq_off), defuintval:0, TYPE_INT, 0}, \
{"chest-freq", CONFIG_HLP_CHESTFREQ, 0, iptr:&(
nrUE_params.
chest_freq), defintval:0, TYPE_INT, 0}, \
{"chest-time", CONFIG_HLP_CHESTTIME, 0, iptr:&(
nrUE_params.
chest_time), defintval:0, TYPE_INT, 0}, \
{"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, iptr:&(
nrUE_params.no_timing_correction), defintval:0, TYPE_INT, 0}
\
}
typedef
struct
{
uint64_t
optmask
;
//mask to store boolean config options
uint32_t
ofdm_offset_divisor
;
// Divisor for sample offset computation for each OFDM symbol
uint8_t
max_ldpc_iterations
;
// number of maximum LDPC iterations
int
max_ldpc_iterations
;
// number of maximum LDPC iterations
tpool_t
Tpool
;
// thread pool
int
UE_scan_carrier
;
int
UE_fo_compensation
;
int
timing_advance
;
uint64_t
if_freq
;
int
if_freq_off
;
int
chest_freq
;
int
chest_time
;
int
no_timing_correction
;
int
nb_antennas_rx
;
int
nb_antennas_tx
;
int
threequarter_fs
;
int
N_RB_DL
;
int
ssb_start_subcarrier
;
}
nrUE_params_t
;
extern
uint64_t
get_nrUE_optmask
(
void
);
extern
uint64_t
set_nrUE_optmask
(
uint64_t
bitmask
);
...
...
openair1/PHY/defs_nr_UE.h
View file @
69507efa
...
...
@@ -379,9 +379,6 @@ typedef struct {
uint8_t
CC_id
;
/// \brief Mapping of CC_id antennas to cards
openair0_rf_map
rf_map
;
//uint8_t local_flag;
/// \brief Indicator of current run mode of UE (normal_txrx, rx_calib_ue, no_L2_connect, debug_prach)
runmode_t
mode
;
/// \brief Indicator that UE should perform band scanning
int
UE_scan
;
/// \brief Indicator that UE should perform coarse scanning around carrier
...
...
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