Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Aniq Ur Rahman
openairinterface5G
Commits
cc2cc95f
Commit
cc2cc95f
authored
Nov 13, 2020
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into fix_pdsch_low_prb
parents
f36f724b
b4522183
Changes
57
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
57 changed files
with
1556 additions
and
1136 deletions
+1556
-1136
ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
+1
-1
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+2
-1
doc/FEATURE_SET.md
doc/FEATURE_SET.md
+2
-0
doc/RUNMODEM.md
doc/RUNMODEM.md
+36
-0
executables/nr-ru.c
executables/nr-ru.c
+28
-28
executables/nr-ue.c
executables/nr-ue.c
+34
-51
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+129
-320
executables/nr-uesoftmodem.h
executables/nr-uesoftmodem.h
+3
-10
executables/softmodem-common.h
executables/softmodem-common.h
+3
-0
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+2
-1
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+9
-37
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+56
-266
openair1/PHY/INIT/nr_parms.c
openair1/PHY/INIT/nr_parms.c
+26
-13
openair1/PHY/INIT/phy_init.h
openair1/PHY/INIT/phy_init.h
+2
-1
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+1
-1
openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_tools_nr.c
+3
-3
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+2
-18
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+10
-1
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+0
-3
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+25
-0
openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
+90
-0
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
+12
-9
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
+0
-4
openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c
+2
-2
openair1/PHY/defs_RU.h
openair1/PHY/defs_RU.h
+2
-0
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+0
-9
openair1/PHY/phy_extern_nr_ue.h
openair1/PHY/phy_extern_nr_ue.h
+2
-1
openair1/PHY/thread_NR_UE.h
openair1/PHY/thread_NR_UE.h
+2
-2
openair1/SCHED_NR/phy_frame_config_nr.c
openair1/SCHED_NR/phy_frame_config_nr.c
+1
-1
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+3
-1
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+2
-2
openair1/SCHED_NR_UE/harq_nr.c
openair1/SCHED_NR_UE/harq_nr.c
+3
-3
openair1/SCHED_NR_UE/pucch_power_control_ue_nr.c
openair1/SCHED_NR_UE/pucch_power_control_ue_nr.c
+1
-1
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+3
-3
openair1/SIMULATION/NR_PHY/prachsim.c
openair1/SIMULATION/NR_PHY/prachsim.c
+3
-3
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+5
-7
openair1/SIMULATION/NR_UE_PHY/unit_tests/src/frame_config_test.c
...1/SIMULATION/NR_UE_PHY/unit_tests/src/frame_config_test.c
+7
-6
openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c
...air1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c
+18
-14
openair1/SIMULATION/NR_UE_PHY/unit_tests/src/srs_test.c
openair1/SIMULATION/NR_UE_PHY/unit_tests/src/srs_test.c
+5
-4
openair2/ENB_APP/enb_paramdef.h
openair2/ENB_APP/enb_paramdef.h
+3
-0
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+145
-99
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+3
-1
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+4
-11
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+1
-1
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+2
-2
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+15
-4
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+250
-161
openair2/LAYER2/NR_MAC_UE/rar_tools_nrUE.c
openair2/LAYER2/NR_MAC_UE/rar_tools_nrUE.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+6
-13
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+0
-2
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+6
-5
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
+1
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf
.../GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpn300.conf
+284
-0
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf
.../GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf
+284
-0
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
.../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
+1
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf
.../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf
+14
-6
No files found.
ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
View file @
cc2cc95f
...
@@ -126,10 +126,10 @@ gNBs =
...
@@ -126,10 +126,10 @@ gNBs =
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
#
msg1_SubcarrierSpacing
=
1
,
msg1_SubcarrierSpacing
=
1
,
# restrictedSetConfig
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig
=
0
,
restrictedSetConfig
=
0
,
# pusch-ConfigCommon (up to 16 elements)
# pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0
=
6
;
initialULBWPk2_0
=
6
;
initialULBWPmappingType_0
=
1
initialULBWPmappingType_0
=
1
...
...
cmake_targets/CMakeLists.txt
View file @
cc2cc95f
...
@@ -1739,6 +1739,7 @@ set(PHY_SRC_UE
...
@@ -1739,6 +1739,7 @@ set(PHY_SRC_UE
${
OPENAIR1_DIR
}
/PHY/NR_UE_TRANSPORT/sss_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_TRANSPORT/sss_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_TRANSPORT/cic_filter_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_TRANSPORT/cic_filter_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_TRANSPORT/nr_pbch.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_TRANSPORT/nr_pbch.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
...
@@ -3258,7 +3259,7 @@ if (${T_TRACER})
...
@@ -3258,7 +3259,7 @@ if (${T_TRACER})
SECU_OSA SECU_CN SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
SECU_OSA SECU_CN SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE MAC_NR_COMMON MAC_NR MAC_UE_NR
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE
L2_UE_LTE_NR
MAC_NR_COMMON MAC_NR MAC_UE_NR
CN_UTILS GTPV1U NR_GTPV1U SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB
CN_UTILS GTPV1U NR_GTPV1U SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB
ldpc_orig ldpc_optim ldpc_optim8seg ldpc PROTO_AGENT dfts
)
ldpc_orig ldpc_optim ldpc_optim8seg ldpc PROTO_AGENT dfts
)
if
(
TARGET
${
i
}
)
if
(
TARGET
${
i
}
)
...
...
doc/FEATURE_SET.md
View file @
cc2cc95f
...
@@ -254,9 +254,11 @@ The NAS layer is based on **3GPP 24.301** and implements the following functions
...
@@ -254,9 +254,11 @@ The NAS layer is based on **3GPP 24.301** and implements the following functions
The following features are valid for the gNB and the 5G-NR UE.
The following features are valid for the gNB and the 5G-NR UE.
*
Static TDD,
*
Static TDD,
*
FDD
*
Normal CP
*
Normal CP
*
30 kHz subcarrier spacing
*
30 kHz subcarrier spacing
*
Bandwidths up to 80MHz (217 Physical Resource Blocks)
*
Bandwidths up to 80MHz (217 Physical Resource Blocks)
*
Intermediate downlink and uplink frequencies to interface with IF equipment
*
Single antenna port (single beam)
*
Single antenna port (single beam)
*
Slot format: 14 OFDM symbols in UL or DL
*
Slot format: 14 OFDM symbols in UL or DL
*
Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 supported)
*
Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 supported)
...
...
doc/RUNMODEM.md
View file @
cc2cc95f
...
@@ -132,6 +132,42 @@ With the RF simulator (on the same machine):
...
@@ -132,6 +132,42 @@ With the RF simulator (on the same machine):
`sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem --do-ra --rfsim --parallel-config PARALLEL_SINGLE_THREAD`
`sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem --do-ra --rfsim --parallel-config PARALLEL_SINGLE_THREAD`
## IF setup with OAI
The -C and -CO flags can be used together at UE side to set custom downlink and uplink FR1 intermediate frequencies for the IF equipment.
In order to run this setup, the following flags are needed at the UE side:
`-C`
`--CO`
and the following parameters must be configured in the RUs section of the gNB configuration file:
`if_freq`
`if_offset`
### Run OAI with custom DL/UL intermediate frequencies
The following example uses DL frequency 2169.080 MHz and UL frequency offset -400 MHz, with a configuration file for band 66 at gNB side.
From the
`cmake_targets/ran_build/build`
folder:
gNB on machine 1:
`sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band66.tm1.106PRB.usrpx300.conf`
UE on machine 2:
`sudo ./nr-uesoftmodem -C 2169080000 --CO -400000000`
[
oai wiki home
](
https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home
)
[
oai wiki home
](
https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home
)
...
...
executables/nr-ru.c
View file @
cc2cc95f
...
@@ -728,31 +728,27 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
...
@@ -728,31 +728,27 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
//nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame);
//nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame);
if
(
slot_type
==
NR_DOWNLINK_SLOT
||
slot_type
==
NR_MIXED_SLOT
||
IS_SOFTMODEM_RFSIM
)
{
if
(
slot_type
==
NR_DOWNLINK_SLOT
||
slot_type
==
NR_MIXED_SLOT
||
IS_SOFTMODEM_RFSIM
)
{
if
(
slot_type
==
NR_MIXED_SLOT
)
{
if
(
cfg
->
cell_config
.
frame_duplex_type
.
value
==
TDD
){
txsymb
=
0
;
if
(
slot_type
==
NR_MIXED_SLOT
)
{
for
(
int
symbol_count
=
0
;
symbol_count
<
NR_NUMBER_OF_SYMBOLS_PER_SLOT
;
symbol_count
++
)
{
txsymb
=
0
;
if
(
cfg
->
tdd_table
.
max_tdd_periodicity_list
[
slot
].
max_num_of_symbol_per_slot_list
[
symbol_count
].
slot_config
.
value
==
0
)
for
(
int
symbol_count
=
0
;
symbol_count
<
NR_NUMBER_OF_SYMBOLS_PER_SLOT
;
symbol_count
++
)
{
txsymb
++
;
if
(
cfg
->
tdd_table
.
max_tdd_periodicity_list
[
slot
].
max_num_of_symbol_per_slot_list
[
symbol_count
].
slot_config
.
value
==
0
)
txsymb
++
;
}
AssertFatal
(
txsymb
>
0
,
"illegal txsymb %d
\n
"
,
txsymb
);
if
(
slot
%
(
fp
->
slots_per_subframe
/
2
))
siglen
=
txsymb
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
);
else
siglen
=
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples0
)
+
(
txsymb
-
1
)
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
);
//+ ru->end_of_burst_delay;
flags
=
3
;
// end of burst
}
}
AssertFatal
(
txsymb
>
0
,
"illegal txsymb %d
\n
"
,
txsymb
);
if
(
slot
%
(
fp
->
slots_per_subframe
/
2
))
siglen
=
txsymb
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
);
else
siglen
=
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples0
)
+
(
txsymb
-
1
)
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
);
//+ ru->end_of_burst_delay;
flags
=
3
;
// end of burst
}
if
(
cfg
->
cell_config
.
frame_duplex_type
.
value
==
TDD
&&
if
(
slot_type
==
NR_DOWNLINK_SLOT
&&
prevslot_type
==
NR_UPLINK_SLOT
)
slot_type
==
NR_DOWNLINK_SLOT
&&
flags
=
2
;
// start of burst
prevslot_type
==
NR_UPLINK_SLOT
)
{
flags
=
2
;
// start of burst
}
if
(
cfg
->
cell_config
.
frame_duplex_type
.
value
==
TDD
&&
if
(
slot_type
==
NR_DOWNLINK_SLOT
&&
nextslot_type
==
NR_UPLINK_SLOT
)
slot_type
==
NR_DOWNLINK_SLOT
&&
flags
=
3
;
// end of burst
nextslot_type
==
NR_UPLINK_SLOT
)
{
flags
=
3
;
// end of burst
}
}
if
(
fp
->
freq_range
==
nr_FR2
)
{
if
(
fp
->
freq_range
==
nr_FR2
)
{
...
@@ -768,7 +764,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
...
@@ -768,7 +764,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
*/
*/
flags
|=
beam
<<
8
;
flags
|=
beam
<<
8
;
}
}
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_WRITE_FLAGS
,
flags
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_WRITE_FLAGS
,
flags
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU
,
frame
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU
,
frame
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU
,
slot
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU
,
slot
);
...
@@ -1150,19 +1146,22 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
...
@@ -1150,19 +1146,22 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
if
(
ru
->
if_frequency
==
0
)
{
if
(
ru
->
if_frequency
==
0
)
{
cfg
->
tx_freq
[
i
]
=
(
double
)
fp
->
dl_CarrierFreq
;
cfg
->
tx_freq
[
i
]
=
(
double
)
fp
->
dl_CarrierFreq
;
cfg
->
rx_freq
[
i
]
=
(
double
)
fp
->
ul_CarrierFreq
;
cfg
->
rx_freq
[
i
]
=
(
double
)
fp
->
ul_CarrierFreq
;
}
}
else
if
(
ru
->
if_freq_offset
){
else
{
cfg
->
tx_freq
[
i
]
=
(
double
)(
ru
->
if_frequency
);
cfg
->
rx_freq
[
i
]
=
(
double
)(
ru
->
if_frequency
+
ru
->
if_freq_offset
);
LOG_I
(
PHY
,
"Setting IF TX frequency to %lu Hz with IF RX frequency offset %d Hz
\n
"
,
ru
->
if_frequency
,
ru
->
if_freq_offset
);
}
else
{
cfg
->
tx_freq
[
i
]
=
(
double
)
ru
->
if_frequency
;
cfg
->
tx_freq
[
i
]
=
(
double
)
ru
->
if_frequency
;
cfg
->
rx_freq
[
i
]
=
(
double
)(
ru
->
if_frequency
+
fp
->
ul_CarrierFreq
-
fp
->
dl_CarrierFreq
);
cfg
->
rx_freq
[
i
]
=
(
double
)(
ru
->
if_frequency
+
fp
->
ul_CarrierFreq
-
fp
->
dl_CarrierFreq
);
}
}
cfg
->
tx_gain
[
i
]
=
ru
->
att_tx
;
cfg
->
tx_gain
[
i
]
=
ru
->
att_tx
;
cfg
->
rx_gain
[
i
]
=
ru
->
max_rxgain
-
ru
->
att_rx
;
cfg
->
rx_gain
[
i
]
=
ru
->
max_rxgain
-
ru
->
att_rx
;
cfg
->
configFilename
=
rf_config_file
;
cfg
->
configFilename
=
rf_config_file
;
printf
(
"c
hannel %d
, S
etting tx_gain offset %f, rx_gain offset %f, tx_freq %
f
, rx_freq %
f
\n
"
,
LOG_I
(
PHY
,
"C
hannel %d
: s
etting tx_gain offset %f, rx_gain offset %f, tx_freq %
lu Hz
, rx_freq %
lu Hz
\n
"
,
i
,
cfg
->
tx_gain
[
i
],
i
,
cfg
->
tx_gain
[
i
],
cfg
->
rx_gain
[
i
],
cfg
->
rx_gain
[
i
],
cfg
->
tx_freq
[
i
],
(
unsigned
long
)
cfg
->
tx_freq
[
i
],
cfg
->
rx_freq
[
i
]);
(
unsigned
long
)
cfg
->
rx_freq
[
i
]);
}
}
}
}
...
@@ -2495,6 +2494,7 @@ void RCconfig_RU(void)
...
@@ -2495,6 +2494,7 @@ void RCconfig_RU(void)
RC
.
ru
[
j
]
->
att_tx
=
*
(
RUParamList
.
paramarray
[
j
][
RU_ATT_TX_IDX
].
uptr
);
RC
.
ru
[
j
]
->
att_tx
=
*
(
RUParamList
.
paramarray
[
j
][
RU_ATT_TX_IDX
].
uptr
);
RC
.
ru
[
j
]
->
att_rx
=
*
(
RUParamList
.
paramarray
[
j
][
RU_ATT_RX_IDX
].
uptr
);
RC
.
ru
[
j
]
->
att_rx
=
*
(
RUParamList
.
paramarray
[
j
][
RU_ATT_RX_IDX
].
uptr
);
RC
.
ru
[
j
]
->
if_frequency
=
*
(
RUParamList
.
paramarray
[
j
][
RU_IF_FREQUENCY
].
u64ptr
);
RC
.
ru
[
j
]
->
if_frequency
=
*
(
RUParamList
.
paramarray
[
j
][
RU_IF_FREQUENCY
].
u64ptr
);
RC
.
ru
[
j
]
->
if_freq_offset
=
*
(
RUParamList
.
paramarray
[
j
][
RU_IF_FREQ_OFFSET
].
iptr
);
if
(
config_isparamset
(
RUParamList
.
paramarray
[
j
],
RU_BF_WEIGHTS_LIST_IDX
))
{
if
(
config_isparamset
(
RUParamList
.
paramarray
[
j
],
RU_BF_WEIGHTS_LIST_IDX
))
{
RC
.
ru
[
j
]
->
nb_bfw
=
RUParamList
.
paramarray
[
j
][
RU_BF_WEIGHTS_LIST_IDX
].
numelt
;
RC
.
ru
[
j
]
->
nb_bfw
=
RUParamList
.
paramarray
[
j
][
RU_BF_WEIGHTS_LIST_IDX
].
numelt
;
...
...
executables/nr-ue.c
View file @
cc2cc95f
...
@@ -135,17 +135,15 @@ typedef enum {
...
@@ -135,17 +135,15 @@ typedef enum {
void
init_nr_ue_vars
(
PHY_VARS_NR_UE
*
ue
,
void
init_nr_ue_vars
(
PHY_VARS_NR_UE
*
ue
,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
UE_id
,
uint8_t
UE_id
,
uint8_t
abstraction_flag
)
uint8_t
abstraction_flag
)
{
{
int
nb_connected_gNB
=
1
,
gNB_id
;
int
nb_connected_gNB
=
1
,
gNB_id
;
memcpy
(
&
(
ue
->
frame_parms
),
frame_parms
,
sizeof
(
NR_DL_FRAME_PARMS
));
ue
->
Mod_id
=
UE_id
;
ue
->
Mod_id
=
UE_id
;
ue
->
mac_enabled
=
1
;
ue
->
mac_enabled
=
1
;
ue
->
if_inst
=
nr_ue_if_module_init
(
0
);
// Setting UE mode to NOT_SYNCHED by default
// Setting UE mode to NOT_SYNCHED by default
for
(
gNB_id
=
0
;
gNB_id
<
nb_connected_gNB
;
gNB_id
++
){
for
(
gNB_id
=
0
;
gNB_id
<
nb_connected_gNB
;
gNB_id
++
){
...
@@ -158,6 +156,9 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
...
@@ -158,6 +156,9 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
// intialize transport
// intialize transport
init_nr_ue_transport
(
ue
,
abstraction_flag
);
init_nr_ue_transport
(
ue
,
abstraction_flag
);
// init N_TA offset
init_N_TA_offset
(
ue
);
}
}
/*!
/*!
...
@@ -175,31 +176,30 @@ static void UE_synch(void *arg) {
...
@@ -175,31 +176,30 @@ static void UE_synch(void *arg) {
int
i
,
hw_slot_offset
;
int
i
,
hw_slot_offset
;
PHY_VARS_NR_UE
*
UE
=
syncD
->
UE
;
PHY_VARS_NR_UE
*
UE
=
syncD
->
UE
;
sync_mode_t
sync_mode
=
pbch
;
sync_mode_t
sync_mode
=
pbch
;
int
CC_id
=
UE
->
CC_id
;
//
int CC_id = UE->CC_id;
int
freq_offset
=
0
;
static
int
freq_offset
=
0
;
UE
->
is_synchronized
=
0
;
UE
->
is_synchronized
=
0
;
if
(
UE
->
UE_scan
==
0
)
{
if
(
UE
->
UE_scan
==
0
)
{
#ifdef FR2_TEST
// Overwrite DL frequency (for FR2 testing)
// Overwrite DL frequency (for FR2 testing)
if
(
downlink_frequency
[
0
][
0
]
!=
0
){
if
(
downlink_frequency
[
0
][
0
]
!=
0
){
UE
->
frame_parms
.
dl_CarrierFreq
=
downlink_frequency
[
0
][
0
];
UE
->
frame_parms
.
dl_CarrierFreq
=
downlink_frequency
[
0
][
0
];
UE
->
frame_parms
.
ul_CarrierFreq
=
downlink_frequency
[
0
][
0
];
UE
->
frame_parms
.
ul_CarrierFreq
=
downlink_frequency
[
0
][
0
];
}
}
#endif
LOG_I
(
PHY
,
"[SCHED][UE] Check absolute frequency DL %"
PRIu64
", UL %"
PRIu64
" (oai_exit %d, rx_num_channels %d)
\n
"
,
UE
->
frame_parms
.
dl_CarrierFreq
,
UE
->
frame_parms
.
ul_CarrierFreq
,
oai_exit
,
openair0_cfg
[
0
].
rx_num_channels
);
for
(
i
=
0
;
i
<
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_num_channels
;
i
++
)
{
for
(
i
=
0
;
i
<
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_num_channels
;
i
++
)
{
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
UE
->
rf_map
.
chain
+
i
]
=
UE
->
frame_parms
.
dl_CarrierFreq
;
openair0_cfg
[
UE
->
rf_map
.
card
].
tx_freq
[
UE
->
rf_map
.
chain
+
i
]
=
UE
->
frame_parms
.
ul_CarrierFreq
;
LOG_I
(
PHY
,
"[SCHED][UE] Check absolute frequency DL %f, UL %f (RF card %d, oai_exit %d, channel %d, rx_num_channels %d)
\n
"
,
openair0_cfg
[
UE
->
rf_map
.
card
].
autocal
[
UE
->
rf_map
.
chain
+
i
]
=
1
;
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
UE
->
rf_map
.
chain
+
i
],
openair0_cfg
[
UE
->
rf_map
.
card
].
tx_freq
[
UE
->
rf_map
.
chain
+
i
],
if
(
UE
->
frame_parms
.
frame_type
==
FDD
)
UE
->
rf_map
.
card
,
openair0_cfg
[
UE
->
rf_map
.
card
].
duplex_mode
=
duplex_mode_FDD
;
oai_exit
,
else
i
,
openair0_cfg
[
UE
->
rf_map
.
card
].
duplex_mode
=
duplex_mode_TDD
;
openair0_cfg
[
0
].
rx_num_channels
);
}
}
sync_mode
=
pbch
;
sync_mode
=
pbch
;
...
@@ -254,31 +254,25 @@ static void UE_synch(void *arg) {
...
@@ -254,31 +254,25 @@ static void UE_synch(void *arg) {
case
pbch
:
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 (mode %d)
\n
"
,
UE
->
mode
);
uint64_t
dl_carrier
,
ul_carrier
;
double
rx_gain_off
=
0
;
nr_get_carrier_frequencies
(
&
UE
->
frame_parms
,
&
dl_carrier
,
&
ul_carrier
);
if
(
nr_initial_sync
(
&
syncD
->
proc
,
UE
,
UE
->
mode
,
2
)
==
0
)
{
if
(
nr_initial_sync
(
&
syncD
->
proc
,
UE
,
UE
->
mode
,
2
)
==
0
)
{
freq_offset
=
UE
->
common_vars
.
freq_offset
;
// frequency offset computed with pss in initial sync
freq_offset
=
UE
->
common_vars
.
freq_offset
;
// frequency offset computed with pss in initial sync
hw_slot_offset
=
((
UE
->
rx_offset
<<
1
)
/
UE
->
frame_parms
.
samples_per_subframe
*
UE
->
frame_parms
.
slots_per_subframe
)
+
hw_slot_offset
=
((
UE
->
rx_offset
<<
1
)
/
UE
->
frame_parms
.
samples_per_subframe
*
UE
->
frame_parms
.
slots_per_subframe
)
+
round
((
float
)((
UE
->
rx_offset
<<
1
)
%
UE
->
frame_parms
.
samples_per_subframe
)
/
UE
->
frame_parms
.
samples_per_slot0
);
round
((
float
)((
UE
->
rx_offset
<<
1
)
%
UE
->
frame_parms
.
samples_per_subframe
)
/
UE
->
frame_parms
.
samples_per_slot0
);
LOG_I
(
PHY
,
"Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %d (DL %lu, UL %lu), UE_scan_carrier %d
\n
"
,
hw_slot_offset
,
freq_offset
,
UE
->
rx_total_gain_dB
,
UE
->
frame_parms
.
dl_CarrierFreq
+
freq_offset
,
UE
->
frame_parms
.
ul_CarrierFreq
+
freq_offset
,
UE
->
UE_scan_carrier
);
// rerun with new cell parameters and frequency-offset
// rerun with new cell parameters and frequency-offset
for
(
i
=
0
;
i
<
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_num_channels
;
i
++
)
{
// todo: the freq_offset computed on DL shall be scaled before being applied to UL
openair0_cfg
[
UE
->
rf_map
.
card
]
.
rx_gain
[
UE
->
rf_map
.
chain
+
i
]
=
UE
->
rx_total_gain_dB
;
//-USRP_GAIN_OFFSET
;
nr_rf_card_config
(
&
openair0_cfg
[
UE
->
rf_map
.
card
]
,
rx_gain
_off
,
ul_carrier
,
dl_carrier
,
freq_offset
)
;
if
(
freq_offset
>=
0
)
LOG_I
(
PHY
,
"Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %f (DL %f Hz, UL %f Hz)
\n
"
,
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
UE
->
rf_map
.
chain
+
i
]
+=
abs
(
freq_offset
);
hw_slot_offset
,
else
freq_offset
,
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
UE
->
rf_map
.
chain
+
i
]
-=
abs
(
freq_offset
);
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_gain
[
0
],
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
0
],
openair0_cfg
[
UE
->
rf_map
.
card
].
tx_freq
[
UE
->
rf_map
.
chain
+
i
]
=
openair0_cfg
[
UE
->
rf_map
.
card
].
tx_freq
[
0
]);
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
UE
->
rf_map
.
chain
+
i
]
+
(
UE
->
frame_parms
.
ul_CarrierFreq
-
UE
->
frame_parms
.
dl_CarrierFreq
);
UE
->
frame_parms
.
dl_CarrierFreq
=
openair0_cfg
[
CC_id
].
rx_freq
[
i
];
}
// reconfigure for potentially different bandwidth
// reconfigure for potentially different bandwidth
switch
(
UE
->
frame_parms
.
N_RB_DL
)
{
switch
(
UE
->
frame_parms
.
N_RB_DL
)
{
...
@@ -322,7 +316,6 @@ static void UE_synch(void *arg) {
...
@@ -322,7 +316,6 @@ static void UE_synch(void *arg) {
//UE->rfdevice.trx_set_gains_func(&openair0,&openair0_cfg[0]);
//UE->rfdevice.trx_set_gains_func(&openair0,&openair0_cfg[0]);
//UE->rfdevice.trx_stop_func(&UE->rfdevice);
//UE->rfdevice.trx_stop_func(&UE->rfdevice);
// sleep(1);
// sleep(1);
//nr_init_frame_parms_ue(&UE->frame_parms);
/*if (UE->rfdevice.trx_start_func(&UE->rfdevice) != 0 ) {
/*if (UE->rfdevice.trx_start_func(&UE->rfdevice) != 0 ) {
LOG_E(HW,"Could not start the device\n");
LOG_E(HW,"Could not start the device\n");
oai_exit=1;
oai_exit=1;
...
@@ -335,31 +328,21 @@ static void UE_synch(void *arg) {
...
@@ -335,31 +328,21 @@ static void UE_synch(void *arg) {
UE
->
is_synchronized
=
1
;
UE
->
is_synchronized
=
1
;
}
}
}
else
{
}
else
{
// initial sync failed
// calculate new offset and try again
if
(
UE
->
UE_scan_carrier
==
1
)
{
if
(
UE
->
UE_scan_carrier
==
1
)
{
if
(
freq_offset
>=
0
)
if
(
freq_offset
>=
0
)
freq_offset
+=
100
;
freq_offset
+=
100
;
freq_offset
*=
-
1
;
freq_offset
*=
-
1
;
LOG_I
(
PHY
,
"[initial_sync] trying carrier off %d Hz, rxgain %d (DL %lu, UL %lu)
\n
"
,
freq_offset
,
UE
->
rx_total_gain_dB
,
UE
->
frame_parms
.
dl_CarrierFreq
+
freq_offset
,
UE
->
frame_parms
.
ul_CarrierFreq
+
freq_offset
);
for
(
i
=
0
;
i
<
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_num_channels
;
i
++
)
{
nr_rf_card_config
(
&
openair0_cfg
[
UE
->
rf_map
.
card
],
rx_gain_off
,
ul_carrier
,
dl_carrier
,
freq_offset
);
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
UE
->
rf_map
.
chain
+
i
]
=
UE
->
frame_parms
.
dl_CarrierFreq
+
freq_offset
;
openair0_cfg
[
UE
->
rf_map
.
card
].
tx_freq
[
UE
->
rf_map
.
chain
+
i
]
=
UE
->
frame_parms
.
ul_CarrierFreq
+
freq_offset
;
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_gain
[
UE
->
rf_map
.
chain
+
i
]
=
UE
->
rx_total_gain_dB
;
//-USRP_GAIN_OFFSET;
if
(
UE
->
UE_scan_carrier
==
1
)
LOG_I
(
PHY
,
"Initial sync failed: trying carrier off %d Hz
\n
"
,
freq_offset
);
openair0_cfg
[
UE
->
rf_map
.
card
].
autocal
[
UE
->
rf_map
.
chain
+
i
]
=
1
;
}
if
(
UE
->
mode
!=
loop_through_memory
)
if
(
UE
->
mode
!=
loop_through_memory
)
UE
->
rfdevice
.
trx_set_freq_func
(
&
UE
->
rfdevice
,
&
openair0_cfg
[
0
],
0
);
UE
->
rfdevice
.
trx_set_freq_func
(
&
UE
->
rfdevice
,
&
openair0_cfg
[
0
],
0
);
}
// initial_sync=0
}
break
;
break
;
...
...
executables/nr-uesoftmodem.c
View file @
cc2cc95f
This diff is collapsed.
Click to expand it.
executables/nr-uesoftmodem.h
View file @
cc2cc95f
...
@@ -48,13 +48,12 @@
...
@@ -48,13 +48,12 @@
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&UE_scan_carrier, defintval:0, TYPE_INT, 0}, \
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&UE_scan_carrier, defintval:0, TYPE_INT, 0}, \
{"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, iptr:&UE_fo_compensation, defintval:0, TYPE_INT, 0}, \
{"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, iptr:&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}, \
{"r" , CONFIG_HLP_PRB, 0, iptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT, 0}, \
{"r" , CONFIG_HLP_PRB, 0, iptr:&(N_RB_DL), defintval:25, TYPE_UINT, 0}, \
{"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
{"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&usrp_args, defstrval:"type=b200", TYPE_STRING, 0} \
{"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&usrp_args, defstrval:"type=b200", TYPE_STRING, 0} \
}
}
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* command line parameters common to
eNode
B and UE */
/* command line parameters common to
gN
B and UE
*/
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_PARAMS_DESC_UE { \
#define CMDLINE_PARAMS_DESC_UE { \
...
@@ -62,22 +61,16 @@
...
@@ -62,22 +61,16 @@
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 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}, \
{"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}, \
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \
{"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, iptr:&nonbiotflag, 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}, \
{"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH,0, strptr:(char **)&rrc_config_path, defstrval:"./", TYPE_STRING, 0} \
{"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH,0, strptr:(char **)&rrc_config_path, defstrval:"./", TYPE_STRING, 0} \
}
}
extern
int
T_port
;
extern
int
T_port
;
extern
int
T_nowait
;
extern
int
T_nowait
;
extern
int
T_dont_fork
;
extern
int
T_dont_fork
;
// In nr-ue.c
// In nr-ue.c
extern
int
setup_nr_ue_buffers
(
PHY_VARS_NR_UE
**
phy_vars_ue
,
openair0_config_t
*
openair0_cfg
);
extern
int
setup_nr_ue_buffers
(
PHY_VARS_NR_UE
**
phy_vars_ue
,
openair0_config_t
*
openair0_cfg
);
extern
void
fill_ue_band_info
(
void
);
extern
void
fill_ue_band_info
(
void
);
...
@@ -86,7 +79,7 @@ extern void init_NR_UE_threads(int);
...
@@ -86,7 +79,7 @@ extern void init_NR_UE_threads(int);
extern
void
reset_opp_meas
(
void
);
extern
void
reset_opp_meas
(
void
);
extern
void
print_opp_meas
(
void
);
extern
void
print_opp_meas
(
void
);
void
*
UE_thread
(
void
*
arg
);
void
*
UE_thread
(
void
*
arg
);
void
init_nr_ue_vars
(
PHY_VARS_NR_UE
*
ue
,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
UE_id
,
uint8_t
abstraction_flag
);
void
init_nr_ue_vars
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
UE_id
,
uint8_t
abstraction_flag
);
extern
tpool_t
*
Tpool
;
extern
tpool_t
*
Tpool
;
extern
tpool_t
*
Tpool_dl
;
extern
tpool_t
*
Tpool_dl
;
#endif
#endif
executables/softmodem-common.h
View file @
cc2cc95f
...
@@ -63,6 +63,7 @@ extern "C"
...
@@ -63,6 +63,7 @@ extern "C"
#define CONFIG_HLP_USIM "use XOR autentication algo in case of test usim mode\n"
#define CONFIG_HLP_USIM "use XOR autentication algo in case of test usim mode\n"
#define CONFIG_HLP_NOSNGLT "Disables single-thread mode in lte-softmodem\n"
#define CONFIG_HLP_NOSNGLT "Disables single-thread mode in lte-softmodem\n"
#define CONFIG_HLP_DLF "Set the downlink frequency for all component carriers\n"
#define CONFIG_HLP_DLF "Set the downlink frequency for all component carriers\n"
#define CONFIG_HLP_ULF "Set the uplink frequency offset for all component carriers\n"
#define CONFIG_HLP_CHOFF "Channel id offset\n"
#define CONFIG_HLP_CHOFF "Channel id offset\n"
#define CONFIG_HLP_SOFTS "Enable soft scope and L1 and L2 stats (Xforms)\n"
#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_EXMCAL "Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n"
...
@@ -123,6 +124,7 @@ extern "C"
...
@@ -123,6 +124,7 @@ extern "C"
{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&WAIT_FOR_SYNC, defintval:0, TYPE_INT, 0}, \
{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&WAIT_FOR_SYNC, defintval:0, TYPE_INT, 0}, \
{"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \
{"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \
{"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:0, TYPE_UINT64, 0}, \
{"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:0, TYPE_UINT64, 0}, \
{"CO" , CONFIG_HLP_ULF, 0, iptr:&(uplink_frequency_offset[0][0]), defintval:0, TYPE_INT, 0}, \
{"a" , CONFIG_HLP_CHOFF, 0, iptr:&CHAIN_OFFSET, defintval:0, TYPE_INT, 0}, \
{"a" , CONFIG_HLP_CHOFF, 0, iptr:&CHAIN_OFFSET, defintval:0, TYPE_INT, 0}, \
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:(uint32_t *)&do_forms, defintval:0, TYPE_INT8, 0}, \
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:(uint32_t *)&do_forms, defintval:0, TYPE_INT8, 0}, \
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
...
@@ -230,6 +232,7 @@ extern char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr);
...
@@ -230,6 +232,7 @@ extern char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr);
#define SOFTMODEM_RTSIGNAL (SIGRTMIN+1)
#define SOFTMODEM_RTSIGNAL (SIGRTMIN+1)
extern
void
set_softmodem_sighandler
(
void
);
extern
void
set_softmodem_sighandler
(
void
);
extern
uint64_t
downlink_frequency
[
MAX_NUM_CCs
][
4
];
extern
uint64_t
downlink_frequency
[
MAX_NUM_CCs
][
4
];
extern
int32_t
uplink_frequency_offset
[
MAX_NUM_CCs
][
4
];
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
View file @
cc2cc95f
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include "PHY/impl_defs_nr.h"
#include "PHY/impl_defs_nr.h"
#define NFAPI_UE_MAX_NUM_CB 8
#define NFAPI_UE_MAX_NUM_CB 8
#define NFAPI_MAX_NUM_UL_PDU 8
/*
/*
typedef unsigned int uint32_t;
typedef unsigned int uint32_t;
...
@@ -155,7 +156,7 @@ typedef struct {
...
@@ -155,7 +156,7 @@ typedef struct {
uint16_t
slot
;
uint16_t
slot
;
fapi_nr_tx_config_t
tx_config
;
fapi_nr_tx_config_t
tx_config
;
uint16_t
number_of_pdus
;
uint16_t
number_of_pdus
;
fapi_nr_tx_request_body_t
*
tx_request_body
;
fapi_nr_tx_request_body_t
tx_request_body
[
NFAPI_MAX_NUM_UL_PDU
]
;