remove dead code in common_lib.h

This commit is contained in:
Laurent THOMAS
2026-01-27 13:23:18 +01:00
committed by Robert Schmidt
parent 5b0d34c3ad
commit dd8a25524a
16 changed files with 9 additions and 175 deletions
-44
View File
@@ -45,7 +45,6 @@ int main(int argc, char **argv) {
CONFIG_CLEARRTFLAG(CONFIG_NOEXITONHELP);
lock_memory_to_ram();
int N_RB=50;
int sampling_rate=30.72e6;
int DFT=2048;
int TxAdvanceInDFTSize=12;
@@ -57,20 +56,8 @@ int main(int argc, char **argv) {
char * usrp_addrs="type=b200";
openair0_config_t openair0_cfg= {
//! Module ID for this configuration
.Mod_id=0,
//! duplexing mode
.duplex_mode=0,
//! number of downlink resource blocks
.num_rb_dl=N_RB,
//! number of samples per frame
.samples_per_frame=0,
//! the sample rate for both transmit and receive.
.sample_rate=sampling_rate,
//device is doing mmapped DMA transfers
.mmapped_dma=0,
//! offset in samples between TX and RX paths
.tx_sample_advance=0,
//! samples per packet on the fronthaul interface
.samples_per_packet=1024,
//! number of RX channels (=RX antennas)
@@ -83,17 +70,9 @@ int main(int argc, char **argv) {
//! \brief Center frequency in Hz for TX.
//! index: [0..rx_num_channels[ !!! see lte-ue.c:427 FIXME iterates over rx_num_channels
.tx_freq={freq,freq,freq,freq},
//! \brief memory
//! \brief Pointer to Calibration table for RX gains
.rx_gain_calib_table=NULL,
//! mode for rxgain (ExpressMIMO2)
.rxg_mode={0},
//! \brief Gain for RX in dB.
//! index: [0..rx_num_channels]
.rx_gain={rxGain,rxGain,rxGain,rxGain},
//! \brief Gain offset (for calibration) in dB
//! index: [0..rx_num_channels]
.rx_gain_offset={0},
//! gain for TX in dB
.tx_gain={txGain,txGain,txGain,txGain},
//! RX bandwidth in Hz
@@ -106,32 +85,9 @@ int main(int argc, char **argv) {
.time_source=internal, //internal gpsdo external
//! Manual SDR IP address
.sdr_addrs=usrp_addrs,
//! Auto calibration flag
.autocal={0},
//! Configuration file for LMS7002M
.configFilename="",
//! remote IP/MAC addr for Ethernet interface
.remote_addr="",
//! remote port number for Ethernet interface
.remote_port=0,
//! local IP/MAC addr for Ethernet interface (eNB/BBU, UE)
.my_addr=0,
//! local port number for Ethernet interface (eNB/BBU, UE)
.my_port=0,
//! record player configuration, definition in record_player.h
.recplay_mode=0,
.recplay_conf=NULL,
//! number of samples per tti
.samples_per_tti=0,
};
//-----------------------
openair0_device rfdevice= {
/*!tx write thread*/
//.write_thread={0},
/*!brief Module ID of this device */
.Mod_id=0,
/*!brief Component Carrier ID of this device */
.CC_id=0,
/*!brief Type of this device */
.type=NONE_DEV,
/*!brief Transport protocol type that the device supports (in case I/Q samples need to be transported) */
-1
View File
@@ -551,7 +551,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 is configured for FeMBMS functionality (This flag should be avoided) ... just kept for PBCH initical scan (TODO)
-3
View File
@@ -852,13 +852,10 @@ int main(int argc, char **argv)
if (g_rbSize < 0) g_rbSize = N_RB_DL - g_rbStart;
double fs,txbw,rxbw;
uint32_t samples;
get_samplerate_and_bw(mu,
N_RB_DL,
frame_parms->threequarter_fs,
&fs,
&samples,
&txbw,
&rxbw);
+1 -3
View File
@@ -437,9 +437,7 @@ int main(int argc, char **argv)
double fs=0, eps;
double scs = 30000;
double txbw, rxbw;
uint32_t samples;
get_samplerate_and_bw(mu, N_RB_DL, frame_parms->threequarter_fs, &fs, &samples, &txbw, &rxbw);
get_samplerate_and_bw(mu, N_RB_DL, frame_parms->threequarter_fs, &fs, &txbw, &rxbw);
// cfo with respect to sub-carrier spacing
eps = cfo/scs;
-3
View File
@@ -445,13 +445,10 @@ int main(int argc, char **argv)
gNB->common_vars.rxdataF[0][i] = malloc16_clear(gNB->frame_parms.samples_per_frame_wCP * sizeof(c16_t));
double fs,txbw,rxbw;
uint32_t samples;
get_samplerate_and_bw(mu,
N_RB_DL,
frame_parms->threequarter_fs,
&fs,
&samples,
&txbw,
&rxbw);
+1 -2
View File
@@ -325,8 +325,7 @@ int main(int argc, char *argv[])
snr1 = snr0 + 10;
double sampling_rate, tx_bandwidth, rx_bandwidth;
uint32_t samples;
get_samplerate_and_bw(mu, N_RB_DL, threequarter_fs, &sampling_rate, &samples, &tx_bandwidth, &rx_bandwidth);
get_samplerate_and_bw(mu, N_RB_DL, threequarter_fs, &sampling_rate, &tx_bandwidth, &rx_bandwidth);
// Initialize gNB
gNB = calloc_or_fail(1, sizeof(PHY_VARS_gNB));
-2
View File
@@ -711,12 +711,10 @@ int main(int argc, char *argv[])
snr1 = snr0 + 10;
double sampling_frequency, tx_bandwidth, rx_bandwidth;
uint32_t samples;
get_samplerate_and_bw(mu,
N_RB_DL,
threequarter_fs,
&sampling_frequency,
&samples,
&tx_bandwidth,
&rx_bandwidth);