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
alex037yang
OpenXG-RAN
Commits
3de07300
Commit
3de07300
authored
3 years ago
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reuse softmodem common tags for command line paremeters
parent
a83265df
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
24 deletions
+31
-24
executables/nr-softmodem-common.h
executables/nr-softmodem-common.h
+0
-1
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+12
-5
executables/nr-uesoftmodem.h
executables/nr-uesoftmodem.h
+0
-3
executables/softmodem-common.h
executables/softmodem-common.h
+6
-6
openair1/PHY/INIT/nr_parms.c
openair1/PHY/INIT/nr_parms.c
+4
-3
openair1/PHY/INIT/phy_init.h
openair1/PHY/INIT/phy_init.h
+1
-1
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+3
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+5
-5
No files found.
executables/nr-softmodem-common.h
View file @
3de07300
...
@@ -73,7 +73,6 @@
...
@@ -73,7 +73,6 @@
#define CONFIG_HLP_STMON "Enable processing timing measurement of lte softmodem on per subframe basis \n"
#define CONFIG_HLP_STMON "Enable processing timing measurement of lte softmodem on per subframe basis \n"
#define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \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 "Set the maximum uplink MCS\n"
#define CONFIG_HLP_MUSSB "Set the SSB SCS for UE SA\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_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_UE "Set the lte softmodem as a UE\n"
#define CONFIG_HLP_L2MONW "Enable L2 wireshark messages on localhost \n"
#define CONFIG_HLP_L2MONW "Enable L2 wireshark messages on localhost \n"
...
...
This diff is collapsed.
Click to expand it.
executables/nr-uesoftmodem.c
View file @
3de07300
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
//#include "common/utils/threadPool/thread-pool.h"
//#include "common/utils/threadPool/thread-pool.h"
#include "common/utils/load_module_shlib.h"
#include "common/utils/load_module_shlib.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "common/utils/nr/nr_common.h"
#include "../../ARCH/COMMON/common_lib.h"
#include "../../ARCH/COMMON/common_lib.h"
#include "../../ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
#include "../../ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
...
@@ -431,17 +432,23 @@ int main( int argc, char **argv ) {
...
@@ -431,17 +432,23 @@ int main( int argc, char **argv ) {
for
(
int
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
for
(
int
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
PHY_vars_UE_g
[
0
][
CC_id
]
=
(
PHY_VARS_NR_UE
*
)
malloc
(
sizeof
(
PHY_VARS_NR_UE
));
PHY_vars_UE_g
[
0
][
CC_id
]
=
(
PHY_VARS_NR_UE
*
)
malloc
(
sizeof
(
PHY_VARS_NR_UE
));
UE
[
CC_id
]
=
PHY_vars_UE_g
[
0
][
CC_id
];
UE
[
CC_id
]
=
PHY_vars_UE_g
[
0
][
CC_id
];
memset
(
UE
[
CC_id
],
0
,
sizeof
(
PHY_VARS_NR_UE
));
memset
(
UE
[
CC_id
],
0
,
sizeof
(
PHY_VARS_NR_UE
));
set_options
(
CC_id
,
UE
[
CC_id
]);
set_options
(
CC_id
,
UE
[
CC_id
]);
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
if
(
get_softmodem_params
()
->
sa
)
if
(
get_softmodem_params
()
->
sa
)
{
nr_init_frame_parms_ue_sa
(
&
UE
[
CC_id
]
->
frame_parms
,
downlink_frequency
[
CC_id
][
0
],
uplink_frequency_offset
[
CC_id
][
0
]);
uint16_t
nr_band
=
get_band
(
downlink_frequency
[
CC_id
][
0
],
uplink_frequency_offset
[
CC_id
][
0
]);
mac
->
nr_band
=
nr_band
;
nr_init_frame_parms_ue_sa
(
&
UE
[
CC_id
]
->
frame_parms
,
downlink_frequency
[
CC_id
][
0
],
uplink_frequency_offset
[
CC_id
][
0
],
get_softmodem_params
()
->
numerology
,
nr_band
);
}
else
{
else
{
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
if
(
mac
->
if_module
!=
NULL
&&
mac
->
if_module
->
phy_config_request
!=
NULL
)
if
(
mac
->
if_module
!=
NULL
&&
mac
->
if_module
->
phy_config_request
!=
NULL
)
mac
->
if_module
->
phy_config_request
(
&
mac
->
phy_config
);
mac
->
if_module
->
phy_config_request
(
&
mac
->
phy_config
);
...
...
This diff is collapsed.
Click to expand it.
executables/nr-uesoftmodem.h
View file @
3de07300
...
@@ -56,10 +56,7 @@
...
@@ -56,10 +56,7 @@
{"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, iptr:&(UE->UE_fo_compensation), defintval:0, TYPE_INT, 0}, \
{"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, iptr:&(UE->UE_fo_compensation), defintval:0, TYPE_INT, 0}, \
{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, 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}, \
{"A" , CONFIG_HLP_TADV, 0, iptr:&(UE->timing_advance), defintval:0, TYPE_INT, 0}, \
{"D" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:DEFAULT_DLF,TYPE_UINT64,0}, \
{"U" , CONFIG_HLP_ULOFF, 0, iptr:&(uplink_frequency_offset[0][0]), defuintval:0, TYPE_INT, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, u8ptr:&(fp->threequarter_fs), defintval:0, TYPE_UINT8, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, u8ptr:&(fp->threequarter_fs), defintval:0, TYPE_UINT8, 0}, \
{"m" , CONFIG_HLP_MUSSB, 0, u8ptr:&(fp->numerology_index), defintval:0, TYPE_UINT8, 0}, \
{"r" , CONFIG_HLP_PRB, 0, iptr:&(fp->N_RB_DL), defintval:106, TYPE_UINT, 0}, \
{"r" , CONFIG_HLP_PRB, 0, iptr:&(fp->N_RB_DL), defintval:106, TYPE_UINT, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, iptr:&(UE->no_timing_correction), defintval:0, TYPE_INT, 0}, \
{"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, iptr:&(UE->no_timing_correction), defintval:0, TYPE_INT, 0}, \
...
...
This diff is collapsed.
Click to expand it.
executables/softmodem-common.h
View file @
3de07300
This diff is collapsed.
Click to expand it.
openair1/PHY/INIT/nr_parms.c
View file @
3de07300
...
@@ -327,20 +327,21 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
...
@@ -327,20 +327,21 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
return
0
;
return
0
;
}
}
void
nr_init_frame_parms_ue_sa
(
NR_DL_FRAME_PARMS
*
frame_parms
,
uint64_t
downlink_frequency
,
int32_t
delta_duplex
)
{
void
nr_init_frame_parms_ue_sa
(
NR_DL_FRAME_PARMS
*
frame_parms
,
uint64_t
downlink_frequency
,
int32_t
delta_duplex
,
uint8_t
mu
,
uint16_t
nr_band
)
{
LOG_I
(
PHY
,
"SA init parameters. DL freq %lu UL offset %d SSB numerology %d N_RB_DL %d
\n
"
,
LOG_I
(
PHY
,
"SA init parameters. DL freq %lu UL offset %d SSB numerology %d N_RB_DL %d
\n
"
,
downlink_frequency
,
downlink_frequency
,
delta_duplex
,
delta_duplex
,
frame_parms
->
numerology_index
,
mu
,
frame_parms
->
N_RB_DL
);
frame_parms
->
N_RB_DL
);
frame_parms
->
numerology_index
=
mu
;
frame_parms
->
dl_CarrierFreq
=
downlink_frequency
;
frame_parms
->
dl_CarrierFreq
=
downlink_frequency
;
frame_parms
->
ul_CarrierFreq
=
downlink_frequency
+
delta_duplex
;
frame_parms
->
ul_CarrierFreq
=
downlink_frequency
+
delta_duplex
;
frame_parms
->
freq_range
=
(
frame_parms
->
dl_CarrierFreq
<
6e9
)
?
nr_FR1
:
nr_FR2
;
frame_parms
->
freq_range
=
(
frame_parms
->
dl_CarrierFreq
<
6e9
)
?
nr_FR1
:
nr_FR2
;
frame_parms
->
N_RB_UL
=
frame_parms
->
N_RB_DL
;
frame_parms
->
N_RB_UL
=
frame_parms
->
N_RB_DL
;
frame_parms
->
nr_band
=
get_band
(
downlink_frequency
,
delta_duplex
)
;
frame_parms
->
nr_band
=
nr_band
;
frame_parms
->
frame_type
=
get_frame_type
(
frame_parms
->
nr_band
,
frame_parms
->
numerology_index
);
frame_parms
->
frame_type
=
get_frame_type
(
frame_parms
->
nr_band
,
frame_parms
->
numerology_index
);
frame_parms
->
Ncp
=
NORMAL
;
frame_parms
->
Ncp
=
NORMAL
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/INIT/phy_init.h
View file @
3de07300
...
@@ -394,7 +394,7 @@ void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
...
@@ -394,7 +394,7 @@ void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
int
nr_get_ssb_start_symbol
(
NR_DL_FRAME_PARMS
*
fp
,
uint8_t
i_ssb
);
int
nr_get_ssb_start_symbol
(
NR_DL_FRAME_PARMS
*
fp
,
uint8_t
i_ssb
);
int
nr_init_frame_parms
(
nfapi_nr_config_request_scf_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
);
int
nr_init_frame_parms
(
nfapi_nr_config_request_scf_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
);
int
nr_init_frame_parms_ue
(
NR_DL_FRAME_PARMS
*
frame_parms
,
fapi_nr_config_request_t
*
config
,
uint16_t
nr_band
);
int
nr_init_frame_parms_ue
(
NR_DL_FRAME_PARMS
*
frame_parms
,
fapi_nr_config_request_t
*
config
,
uint16_t
nr_band
);
void
nr_init_frame_parms_ue_sa
(
NR_DL_FRAME_PARMS
*
frame_parms
,
uint64_t
downlink_frequency
,
int32_t
uplink_frequency_offset
);
void
nr_init_frame_parms_ue_sa
(
NR_DL_FRAME_PARMS
*
frame_parms
,
uint64_t
downlink_frequency
,
int32_t
uplink_frequency_offset
,
uint8_t
mu
,
uint16_t
nr_band
);
int
init_nr_ue_signal
(
PHY_VARS_NR_UE
*
ue
,
int
nb_connected_eNB
,
uint8_t
abstraction_flag
);
int
init_nr_ue_signal
(
PHY_VARS_NR_UE
*
ue
,
int
nb_connected_eNB
,
uint8_t
abstraction_flag
);
void
init_nr_ue_transport
(
PHY_VARS_NR_UE
*
ue
,
int
abstraction_flag
);
void
init_nr_ue_transport
(
PHY_VARS_NR_UE
*
ue
,
int
abstraction_flag
);
void
init_N_TA_offset
(
PHY_VARS_NR_UE
*
ue
);
void
init_N_TA_offset
(
PHY_VARS_NR_UE
*
ue
);
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
3de07300
...
@@ -352,6 +352,7 @@ typedef struct {
...
@@ -352,6 +352,7 @@ typedef struct {
RA_config_t
ra
;
RA_config_t
ra
;
/// SSB index from MIB decoding
/// SSB index from MIB decoding
uint8_t
mib_ssb
;
uint8_t
mib_ssb
;
/// Last NDI of UL HARQ processes
/// Last NDI of UL HARQ processes
uint8_t
UL_ndi
[
NR_MAX_HARQ_PROCESSES
];
uint8_t
UL_ndi
[
NR_MAX_HARQ_PROCESSES
];
...
@@ -374,6 +375,8 @@ typedef struct {
...
@@ -374,6 +375,8 @@ typedef struct {
NR_SearchSpace_t
*
search_space_zero
;
NR_SearchSpace_t
*
search_space_zero
;
NR_ControlResourceSet_t
*
coreset0
;
NR_ControlResourceSet_t
*
coreset0
;
uint16_t
nr_band
;
}
NR_UE_MAC_INST_t
;
}
NR_UE_MAC_INST_t
;
typedef
enum
seach_space_mask_e
{
typedef
enum
seach_space_mask_e
{
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
3de07300
...
@@ -105,7 +105,6 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
...
@@ -105,7 +105,6 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
LOG_I
(
MAC
,
"[L2][MAC] decode mib
\n
"
);
LOG_I
(
MAC
,
"[L2][MAC] decode mib
\n
"
);
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
NR_ServingCellConfigCommon_t
*
scc
=
mac
->
scc
;
frequency_range_t
frequency_range
;
frequency_range_t
frequency_range
;
nr_mac_rrc_data_ind_ue
(
module_id
,
cc_id
,
gNB_index
,
NR_BCCH_BCH
,
(
uint8_t
*
)
pduP
,
3
);
// fixed 3 bytes MIB PDU
nr_mac_rrc_data_ind_ue
(
module_id
,
cc_id
,
gNB_index
,
NR_BCCH_BCH
,
(
uint8_t
*
)
pduP
,
3
);
// fixed 3 bytes MIB PDU
...
@@ -147,9 +146,8 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
...
@@ -147,9 +146,8 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
if
(
get_softmodem_params
()
->
sa
==
1
)
{
if
(
get_softmodem_params
()
->
sa
==
1
)
{
// TODO these values shouldn't be taken from SCC in SA
uint8_t
scs_ssb
=
get_softmodem_params
()
->
numerology
;
uint8_t
scs_ssb
=
*
scc
->
ssbSubcarrierSpacing
;
uint32_t
band
=
mac
->
nr_band
;
uint32_t
band
=
*
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
frequencyBandList
.
list
.
array
[
0
];
uint16_t
ssb_start_symbol
=
get_ssb_start_symbol
(
band
,
scs_ssb
,
ssb_index
);
uint16_t
ssb_start_symbol
=
get_ssb_start_symbol
(
band
,
scs_ssb
,
ssb_index
);
uint16_t
ssb_offset_point_a
=
(
ssb_start_subcarrier
-
ssb_subcarrier_offset
)
/
12
;
uint16_t
ssb_offset_point_a
=
(
ssb_start_subcarrier
-
ssb_subcarrier_offset
)
/
12
;
...
@@ -170,9 +168,11 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
...
@@ -170,9 +168,11 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
mac
->
type0_pdcch_ss_n_c
=
mac
->
type0_PDCCH_CSS_config
.
n_c
;
mac
->
type0_pdcch_ss_n_c
=
mac
->
type0_PDCCH_CSS_config
.
n_c
;
}
}
mac
->
dl_config_request
.
sfn
=
mac
->
type0_PDCCH_CSS_config
.
frame
;
//TODO is this needed?
mac
->
dl_config_request
.
sfn
=
frame
;
mac
->
dl_config_request
.
slot
=
(
ssb_index
>>
1
)
+
((
ssb_index
>>
4
)
<<
1
);
// not valid for 240kHz SCS
mac
->
dl_config_request
.
slot
=
(
ssb_index
>>
1
)
+
((
ssb_index
>>
4
)
<<
1
);
// not valid for 240kHz SCS
return
0
;
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
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