move command line sample offset and 3/4 sampling option at top level, as it is common option for 4G,5G xNB and UE
This commit is contained in:
@@ -103,7 +103,6 @@ struct timing_info_t {
|
||||
} timing_info;
|
||||
|
||||
// Fix per CC openair rf/if device update
|
||||
// extern openair0_device openair0;
|
||||
|
||||
extern int oai_exit;
|
||||
|
||||
|
||||
+31
-26
@@ -808,26 +808,31 @@ void tx_rf(RU_t *ru,
|
||||
/* add fail safe for late command end */
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 );
|
||||
// prepare tx buffer pointers
|
||||
txs = ru->rfdevice.trx_write_func(&ru->rfdevice,
|
||||
timestamp+ru->ts_offset-ru->openair0_cfg.tx_sample_advance-sf_extension,
|
||||
txp,
|
||||
siglen+sf_extension,
|
||||
ru->nb_tx,
|
||||
flags);
|
||||
ru->south_out_cnt++;
|
||||
LOG_D(PHY,"south_out_cnt %d\n",ru->south_out_cnt);
|
||||
int se = dB_fixed(signal_energy(txp[0],siglen+sf_extension));
|
||||
txs = ru->rfdevice
|
||||
.trx_write_func(&ru->rfdevice, timestamp + ru->ts_offset - sf_extension, txp, siglen + sf_extension, ru->nb_tx, flags);
|
||||
ru->south_out_cnt++;
|
||||
LOG_D(PHY, "south_out_cnt %d\n", ru->south_out_cnt);
|
||||
int se = dB_fixed(signal_energy(txp[0], siglen + sf_extension));
|
||||
|
||||
if (SF_type == SF_S) LOG_D(PHY,"[TXPATH] RU %d tx_rf (en %d,len %d), writing to TS %llu, frame %d, unwrapped_frame %d, subframe %d\n",ru->idx, se,
|
||||
siglen+sf_extension, (long long unsigned int)timestamp, frame, proc->frame_tx_unwrap, subframe);
|
||||
if (SF_type == SF_S)
|
||||
LOG_D(PHY,
|
||||
"[TXPATH] RU %d tx_rf (en %d,len %d), writing to TS %llu, frame %d, unwrapped_frame %d, subframe %d\n",
|
||||
ru->idx,
|
||||
se,
|
||||
siglen + sf_extension,
|
||||
(long long unsigned int)timestamp,
|
||||
frame,
|
||||
proc->frame_tx_unwrap,
|
||||
subframe);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0);
|
||||
|
||||
// AssertFatal(txs == siglen+sf_extension,"TX : Timeout (sent %d/%d)\n",txs, siglen);
|
||||
if( usrp_tx_thread == 0 && (txs != siglen+sf_extension) && (late_control==STATE_BURST_NORMAL) ) { /* add fail safe for late command */
|
||||
late_control=STATE_BURST_TERMINATE;
|
||||
LOG_E(PHY,"TX : Timeout (sent %d/%d) state =%d\n",txs, siglen,late_control);
|
||||
}
|
||||
// AssertFatal(txs == siglen+sf_extension,"TX : Timeout (sent %d/%d)\n",txs, siglen);
|
||||
if (usrp_tx_thread == 0 && (txs != siglen + sf_extension)
|
||||
&& (late_control == STATE_BURST_NORMAL)) { /* add fail safe for late command */
|
||||
late_control = STATE_BURST_TERMINATE;
|
||||
LOG_E(PHY, "TX : Timeout (sent %d/%d) state =%d\n", txs, siglen, late_control);
|
||||
}
|
||||
} else if (IS_SOFTMODEM_RFSIM ) {
|
||||
// in case of rfsim, we always enable tx because we need to feed rx of the opposite side
|
||||
// we write 1 single I/Q sample to trigger Rx (rfsim will fill gaps with 0 I/Q)
|
||||
@@ -836,15 +841,15 @@ void tx_rf(RU_t *ru,
|
||||
memset(dummy_tx_data,0,sizeof(dummy_tx_data));
|
||||
for (int i=0; i<ru->frame_parms->nb_antennas_tx; i++)
|
||||
dummy_tx[i]= dummy_tx_data[i];
|
||||
|
||||
AssertFatal( 1 ==
|
||||
ru->rfdevice.trx_write_func(&ru->rfdevice,
|
||||
timestamp+ru->ts_offset-ru->openair0_cfg.tx_sample_advance-sf_extension,
|
||||
dummy_tx,
|
||||
1,
|
||||
ru->frame_parms->nb_antennas_tx,
|
||||
4),"");
|
||||
|
||||
|
||||
AssertFatal(1
|
||||
== ru->rfdevice.trx_write_func(&ru->rfdevice,
|
||||
timestamp + ru->ts_offset - sf_extension,
|
||||
dummy_tx,
|
||||
1,
|
||||
ru->frame_parms->nb_antennas_tx,
|
||||
4),
|
||||
"");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,15 +74,7 @@
|
||||
#define CONFIG_HLP_DLSHIFT "dynamic shift for LLR compuation for TM3/4 (default 0)\n"
|
||||
#define CONFIG_HLP_USRP_ARGS "set the arguments to identify USRP (same syntax as in UHD)\n"
|
||||
#define CONFIG_HLP_DMAMAP "use DMA memory mapping\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_TADV "Set timing_advance\n"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define CONFIG_HLP_TDD "Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n"
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters specific to UE */
|
||||
@@ -106,7 +98,6 @@
|
||||
{"usrp-args", CONFIG_HLP_USRP_ARGS, 0, .strptr=&usrp_args, .defstrval="type=b200",TYPE_STRING, 0}, \
|
||||
{"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, .uptr=&mmapped_dma, .defintval=0, TYPE_INT, 0}, \
|
||||
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, .iptr=&tddflag, .defintval=0, TYPE_INT, 0}, \
|
||||
{"A", CONFIG_HLP_TADV, 0, .iptr=&(timingadv), .defintval=0, TYPE_INT, 0}, \
|
||||
{"ue-idx-standalone", NULL, 0, .u16ptr=&ue_idx_standalone, .defuintval=0xFFFF, TYPE_UINT16, 0}, \
|
||||
{"node-number", NULL, 0, .u16ptr=&node_number, .defuintval=2, TYPE_UINT16, 0}, \
|
||||
}
|
||||
|
||||
+9
-11
@@ -169,7 +169,6 @@ PHY_VARS_UE *init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
memcpy(&(ue->frame_parms), frame_parms, sizeof(LTE_DL_FRAME_PARMS));
|
||||
}
|
||||
|
||||
ue->hw_timing_advance=get_softmodem_params()->hw_timing_advance;
|
||||
ue->Mod_id = UE_id;
|
||||
ue->mac_enabled = 1;
|
||||
|
||||
@@ -1940,16 +1939,15 @@ void *UE_thread(void *arg) {
|
||||
rxp,
|
||||
readBlockSize,
|
||||
UE->frame_parms.nb_antennas_rx),"");
|
||||
AssertFatal( writeBlockSize ==
|
||||
UE->rfdevice.trx_write_func(&UE->rfdevice,
|
||||
timestamp+
|
||||
(2*UE->frame_parms.samples_per_tti) -
|
||||
UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0 -
|
||||
openair0_cfg[0].tx_sample_advance,
|
||||
txp,
|
||||
writeBlockSize,
|
||||
UE->frame_parms.nb_antennas_tx,
|
||||
1),"");
|
||||
AssertFatal(writeBlockSize
|
||||
== UE->rfdevice.trx_write_func(&UE->rfdevice,
|
||||
timestamp + (2 * UE->frame_parms.samples_per_tti)
|
||||
- UE->frame_parms.ofdm_symbol_size - UE->frame_parms.nb_prefix_samples0,
|
||||
txp,
|
||||
writeBlockSize,
|
||||
UE->frame_parms.nb_antennas_tx,
|
||||
1),
|
||||
"");
|
||||
|
||||
if( sub_frame==9) {
|
||||
// read in first symbol of next frame and adjust for timing drift
|
||||
|
||||
@@ -274,8 +274,7 @@ static void get_options(configmodule_interface_t *cfg)
|
||||
{
|
||||
int CC_id=0;
|
||||
int tddflag=0;
|
||||
int dumpframe=0;
|
||||
int timingadv=0;
|
||||
int dumpframe = 0;
|
||||
uint8_t nfapi_mode = NFAPI_MONOLITHIC;
|
||||
|
||||
set_default_frame_parms(frame_parms);
|
||||
@@ -289,8 +288,6 @@ static void get_options(configmodule_interface_t *cfg)
|
||||
config_process_cmdline(cfg, cmdline_ueparams, sizeofArray(cmdline_ueparams), NULL);
|
||||
nfapi_setmode(nfapi_mode);
|
||||
|
||||
get_softmodem_params()->hw_timing_advance = timingadv;
|
||||
|
||||
if ( (cmdline_uemodeparams[CMDLINE_CALIBUERX_IDX].paramflags & PARAMFLAG_PARAMSET) != 0) mode = rx_calib_ue;
|
||||
|
||||
if ( (cmdline_uemodeparams[CMDLINE_CALIBUERXMED_IDX].paramflags & PARAMFLAG_PARAMSET) != 0) mode = rx_calib_ue_med;
|
||||
|
||||
@@ -90,12 +90,8 @@
|
||||
#include <openair1/PHY/NR_TRANSPORT/nr_dlsch.h>
|
||||
#include <PHY/NR_ESTIMATION/nr_ul_estimation.h>
|
||||
|
||||
//#define USRP_DEBUG 1
|
||||
// Fix per CC openair rf/if device update
|
||||
// extern openair0_device openair0;
|
||||
|
||||
|
||||
//pthread_t main_gNB_thread;
|
||||
// #define USRP_DEBUG 1
|
||||
// Fix per CC openair rf/if device update
|
||||
|
||||
time_stats_t softmodem_stats_mt; // main thread
|
||||
time_stats_t softmodem_stats_hw; // hw acquisition
|
||||
|
||||
+4
-10
@@ -102,7 +102,6 @@ int attach_rru(RU_t *ru);
|
||||
int connect_rau(RU_t *ru);
|
||||
static void NRRCconfig_RU(configmodule_interface_t *cfg);
|
||||
|
||||
extern uint32_t timing_advance;
|
||||
extern int emulate_rf;
|
||||
extern int numerology;
|
||||
|
||||
@@ -857,22 +856,17 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
for (i = 0; i < ru->nb_tx; i++)
|
||||
txp[i] = (void *)&ru->common.txdata[i][fp->get_samples_slot_timestamp(slot, fp, 0)] - sf_extension * sizeof(int32_t);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST,
|
||||
(timestamp + ru->ts_offset - ru->openair0_cfg.tx_sample_advance - timing_advance) & 0xffffffff);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (timestamp + ru->ts_offset) & 0xffffffff);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1);
|
||||
// prepare tx buffer pointers
|
||||
txs = ru->rfdevice.trx_write_func(&ru->rfdevice,
|
||||
timestamp + ru->ts_offset - ru->openair0_cfg.tx_sample_advance - timing_advance - sf_extension,
|
||||
txp,
|
||||
siglen + sf_extension,
|
||||
ru->nb_tx,
|
||||
flags);
|
||||
txs = ru->rfdevice
|
||||
.trx_write_func(&ru->rfdevice, timestamp + ru->ts_offset - sf_extension, txp, siglen + sf_extension, ru->nb_tx, flags);
|
||||
LOG_D(PHY,
|
||||
"[TXPATH] RU %d aa %d tx_rf, writing to TS %llu, %d.%d, unwrapped_frame %d, slot %d, flags %d, siglen+sf_extension %d, "
|
||||
"returned %d, E %f\n",
|
||||
ru->idx,
|
||||
i,
|
||||
(long long unsigned int)(timestamp + ru->ts_offset - ru->openair0_cfg.tx_sample_advance - timing_advance - sf_extension),
|
||||
(long long unsigned int)(timestamp + ru->ts_offset - sf_extension),
|
||||
frame,
|
||||
slot,
|
||||
proc->frame_tx_unwrap,
|
||||
|
||||
@@ -56,8 +56,7 @@
|
||||
#define CONFIG_HLP_DMAMAP "use DMA memory mapping\n"
|
||||
#define CONFIG_HLP_EXCCLK "tells hardware to use a clock reference (0:internal(default), 1:external, 2:gpsdo)\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_TADV "Set timing_advance\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_ULOFF "Set the uplink frequnecy offset for all component carriers\n"
|
||||
#define CONFIG_HLP_CHOFF "Channel id offset\n"
|
||||
@@ -80,8 +79,7 @@
|
||||
#define CONFIG_HLP_L2MONW "Enable L2 wireshark messages on localhost \n"
|
||||
#define CONFIG_HLP_L2MONP "Enable L2 pcap messages on localhost \n"
|
||||
#define CONFIG_HLP_MAC "Disable the MAC procedures at UE side (default is enabled)\n"
|
||||
#define CONFIG_HLP_VCD "Enable VCD (generated file will is named openair_dump_eNB.vcd, read it with target/RT/USER/eNB.gtkw\n"
|
||||
#define CONFIG_HLP_TQFS "Apply three-quarter of sampling frequency, 23.04 Msps to reduce the data rate on USB/PCIe transfers (only valid for 20 MHz)\n"
|
||||
#define CONFIG_HLP_VCD "Enable VCD (generated file will is named openair_dump_eNB.vcd, read it with target/RT/USER/eNB.gtkw\n"
|
||||
#define CONFIG_HLP_TPORT "tracer port\n"
|
||||
#define CONFIG_HLP_NOTWAIT "don't wait for tracer, start immediately\n"
|
||||
#define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n"
|
||||
@@ -109,6 +107,7 @@
|
||||
#define CONFIG_HLP_SNR "Set average SNR in dB (for --siml1 option)\n"
|
||||
#define CONFIG_HLP_NOS1 "Disable s1 interface\n"
|
||||
#define CONFIG_HLP_NOKRNMOD "(noS1 only): Use tun instead of namesh module \n"
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters for LOG utility */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
|
||||
@@ -108,8 +108,6 @@ static int wait_for_sync = 0;
|
||||
unsigned int mmapped_dma=0;
|
||||
int single_thread_flag=1;
|
||||
|
||||
int8_t threequarter_fs=0;
|
||||
|
||||
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
|
||||
@@ -145,12 +143,6 @@ int rx_input_level_dBm;
|
||||
|
||||
int otg_enabled;
|
||||
|
||||
//int number_of_cards = 1;
|
||||
|
||||
|
||||
//static NR_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs];
|
||||
//static nfapi_nr_config_request_t *config[MAX_NUM_CCs];
|
||||
uint32_t timing_advance = 0;
|
||||
uint64_t num_missed_slots=0; // counter for the number of missed slots
|
||||
|
||||
#include <SIMULATION/ETH_TRANSPORT/proto.h>
|
||||
@@ -171,8 +163,6 @@ static char *worker_config = NULL;
|
||||
/* struct for ethernet specific parameters given in eNB conf file */
|
||||
eth_params_t *eth_params;
|
||||
|
||||
openair0_config_t openair0_cfg[MAX_CARDS];
|
||||
|
||||
double cpuf;
|
||||
|
||||
/* hack: pdcp_run() is required by 4G scheduler which is compiled into
|
||||
@@ -633,7 +623,6 @@ int main( int argc, char **argv ) {
|
||||
setvbuf(stderr, NULL, _IONBF, 0);
|
||||
#endif
|
||||
mode = normal_txrx;
|
||||
memset(&openair0_cfg[0],0,sizeof(openair0_config_t)*MAX_CARDS);
|
||||
memset(tx_max_power,0,sizeof(int)*MAX_NUM_CCs);
|
||||
logInit();
|
||||
set_latency_target();
|
||||
@@ -647,8 +636,6 @@ int main( int argc, char **argv ) {
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
openair0_cfg[0].threequarter_fs = threequarter_fs;
|
||||
|
||||
if (get_softmodem_params()->do_ra)
|
||||
AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n");
|
||||
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
// clang-format off
|
||||
#define CMDLINE_PARAMS_DESC_GNB { \
|
||||
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, .iptr=&single_thread_flag, .defintval=1, TYPE_INT, 0}, \
|
||||
{"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}, \
|
||||
{"m" , CONFIG_HLP_DLMCS_PHYTEST, 0, .uptr=&target_dl_mcs, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"l" , CONFIG_HLP_DLNL_PHYTEST, 0, .uptr=&target_dl_Nl, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"L" , CONFIG_HLP_ULNL_PHYTEST, 0, .uptr=&target_ul_Nl, .defintval=0, TYPE_UINT, 0}, \
|
||||
|
||||
+1
-2
@@ -933,8 +933,7 @@ void *UE_thread(void *arg)
|
||||
// use previous timing_advance value to compute writeTimestamp
|
||||
writeTimestamp = timestamp +
|
||||
UE->frame_parms.get_samples_slot_timestamp(slot_nr,&UE->frame_parms,DURATION_RX_TO_TX)
|
||||
- firstSymSamp - openair0_cfg[0].tx_sample_advance -
|
||||
UE->N_TA_offset - timing_advance;
|
||||
- firstSymSamp - UE->N_TA_offset - timing_advance;
|
||||
|
||||
// but use current UE->timing_advance value to compute writeBlockSize
|
||||
if (UE->timing_advance != timing_advance) {
|
||||
|
||||
@@ -293,7 +293,6 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){
|
||||
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);
|
||||
@@ -307,7 +306,7 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){
|
||||
|
||||
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->threequarter_fs = get_softmodem_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;
|
||||
|
||||
@@ -52,8 +52,6 @@
|
||||
{"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=&(nrUE_params.timing_advance), .defintval=0, TYPE_INT, 0}, \
|
||||
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, .iptr=&(nrUE_params.threequarter_fs), .defintval=0, TYPE_UINT8, 0}, \
|
||||
{"r" , CONFIG_HLP_PRB_SA, 0, .iptr=&(nrUE_params.N_RB_DL), .defintval=106, TYPE_UINT, 0}, \
|
||||
{"ssb", CONFIG_HLP_SSC, 0, .iptr=&(nrUE_params.ssb_start_subcarrier), .defintval=516, TYPE_UINT16, 0}, \
|
||||
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, .iptr=&tddflag, .defintval=0, TYPE_INT, 0}, \
|
||||
@@ -72,16 +70,14 @@ typedef struct {
|
||||
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;
|
||||
int UE_fo_compensation;
|
||||
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 nb_antennas_tx;
|
||||
int N_RB_DL;
|
||||
int ssb_start_subcarrier;
|
||||
} nrUE_params_t;
|
||||
|
||||
@@ -106,6 +106,7 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask)
|
||||
paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC;
|
||||
checkedparam_t cmdline_CheckParams[] = CMDLINE_PARAMS_CHECK_DESC;
|
||||
int numparams = sizeofArray(cmdline_params);
|
||||
AssertFatal(numparams == sizeofArray(cmdline_CheckParams), "Error in arrays size (%d!=%lu)\n", numparams, sizeofArray(cmdline_CheckParams));
|
||||
config_set_checkfunctions(cmdline_params, cmdline_CheckParams, numparams);
|
||||
config_get(cfg, cmdline_params, numparams, NULL);
|
||||
nfapi_index = config_paramidx_fromname(cmdline_params, numparams, "nfapi");
|
||||
@@ -115,6 +116,8 @@ void get_common_options(configmodule_interface_t *cfg, uint32_t execmask)
|
||||
paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC ;
|
||||
checkedparam_t cmdline_log_CheckParams[] = CMDLINE_LOGPARAMS_CHECK_DESC;
|
||||
int numlogparams = sizeofArray(cmdline_logparams);
|
||||
AssertFatal(numlogparams == sizeofArray(cmdline_log_CheckParams), "Error in arrays size (%d!=%lu)\n", numlogparams, sizeofArray(cmdline_log_CheckParams));
|
||||
|
||||
config_set_checkfunctions(cmdline_logparams, cmdline_log_CheckParams, numlogparams);
|
||||
config_get(cfg, cmdline_logparams, numlogparams, NULL);
|
||||
|
||||
|
||||
@@ -84,7 +84,9 @@ extern "C"
|
||||
#define CONFIG_HLP_ULMCS "Set the maximum uplink MCS\n"
|
||||
|
||||
#define CONFIG_HLP_UE "Set the lte softmodem as a UE\n"
|
||||
#define CONFIG_HLP_TQFS "Apply three-quarter of sampling frequency, 23.04 Msps to reduce the data rate on USB/PCIe transfers (only valid for 20 MHz)\n"
|
||||
#define CONFIG_HLP_TQFS \
|
||||
"Apply three-quarter of sampling frequency, (example 23.04 Msps for LTE 20MHz) to reduce the data rate on USB/PCIe transfers " \
|
||||
"(only valid for some bandwidths)\n"
|
||||
#define CONFIG_HLP_TPORT "tracer port\n"
|
||||
#define CONFIG_HLP_NOTWAIT "don't wait for tracer, start immediately\n"
|
||||
#define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n"
|
||||
@@ -108,6 +110,9 @@ extern "C"
|
||||
#define CONFIG_HLP_NOITTI "Do not start itti threads, call queue processing in place, inside the caller thread"
|
||||
#define CONFIG_HLP_LDPC_OFFLOAD "Enable LDPC offload to AMD Xilinx T2 telco card\n"
|
||||
#define CONFIG_HLP_SYNC_REF "UE acts a Sync Reference in Sidelink. 0-none 1-GNB 2-GNSS 4-localtiming\n"
|
||||
#define CONFIG_HLP_TADV \
|
||||
"Set RF board timing_advance to compensate fix delay inside the RF board between Rx and Tx timestamps (RF board internal " \
|
||||
"issues)\n"
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters common to eNodeB and UE */
|
||||
@@ -187,6 +192,8 @@ extern int usrp_tx_thread;
|
||||
{"no-itti-threads", CONFIG_HLP_NOITTI, PARAMFLAG_BOOL, .iptr=&softmodem_params.no_itti, .defintval=0, TYPE_INT, 0}, \
|
||||
{"ldpc-offload-enable", CONFIG_HLP_LDPC_OFFLOAD, PARAMFLAG_BOOL, .iptr=&LDPC_OFFLOAD_FLAG, .defstrval=0, TYPE_INT, 0}, \
|
||||
{"sync-ref", CONFIG_HLP_SYNC_REF, 0, .uptr=&SYNC_REF, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"A" , CONFIG_HLP_TADV, 0, .iptr=&softmodem_params.command_line_sample_advance,.defintval=0, TYPE_INT, 0}, \
|
||||
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, .iptr=&softmodem_params.threequarter_fs, .defintval=0, TYPE_INT, 0}, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
@@ -236,6 +243,7 @@ extern int usrp_tx_thread;
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
@@ -332,7 +340,7 @@ typedef struct {
|
||||
uint32_t clock_source;
|
||||
uint32_t timing_source;
|
||||
double tune_offset;
|
||||
int hw_timing_advance;
|
||||
int command_line_sample_advance;
|
||||
uint32_t send_dmrs_sync;
|
||||
int use_256qam_table;
|
||||
int chest_time;
|
||||
@@ -346,16 +354,17 @@ typedef struct {
|
||||
uint32_t sync_ref;
|
||||
int no_itti;
|
||||
int ldpc_offload_flag;
|
||||
int threequarter_fs;
|
||||
} softmodem_params_t;
|
||||
|
||||
extern uint64_t get_softmodem_optmask(void);
|
||||
extern uint64_t set_softmodem_optmask(uint64_t bitmask);
|
||||
extern uint64_t clear_softmodem_optmask(uint64_t bitmask);
|
||||
extern softmodem_params_t *get_softmodem_params(void);
|
||||
extern void get_common_options(configmodule_interface_t *cfg, uint32_t execmask);
|
||||
extern char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr);
|
||||
uint64_t get_softmodem_optmask(void);
|
||||
uint64_t set_softmodem_optmask(uint64_t bitmask);
|
||||
uint64_t clear_softmodem_optmask(uint64_t bitmask);
|
||||
softmodem_params_t *get_softmodem_params(void);
|
||||
void get_common_options(configmodule_interface_t *cfg, uint32_t execmask);
|
||||
char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr);
|
||||
#define SOFTMODEM_RTSIGNAL (SIGRTMIN+1)
|
||||
extern void set_softmodem_sighandler(void);
|
||||
void set_softmodem_sighandler(void);
|
||||
extern uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
extern int usrp_tx_thread;
|
||||
|
||||
Reference in New Issue
Block a user