Remove threequarter_fs, log_level; make functions static
2 functions with same name as static to make it clearer they are separate. remove unused copy of log_level global var. remove threequarter sampling variable from the radio board general configuration. The decision of sampling rate is made above. A better behavior can be done later, like ask to the radio board what sampling rate it can do,then use it to decide the appropiate sampling rate from the gNB configuration. In UE case, it is another issue, as the sampling rate would change after we decode SIB1, but also it is not developped yet.
This commit is contained in:
committed by
Robert Schmidt
parent
78f12dbc03
commit
c4f4f8d919
@@ -384,7 +384,8 @@ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
|
||||
}
|
||||
}
|
||||
|
||||
void init_openair0(LTE_DL_FRAME_PARMS *frame_parms,int rxgain) {
|
||||
static void init_openair0(LTE_DL_FRAME_PARMS *frame_parms, int rxgain)
|
||||
{
|
||||
int card;
|
||||
int i;
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){
|
||||
|
||||
}
|
||||
|
||||
void init_openair0()
|
||||
static void init_openair0()
|
||||
{
|
||||
int card;
|
||||
int freq_off = 0;
|
||||
@@ -261,7 +261,6 @@ void init_openair0()
|
||||
for (card=0; card<MAX_CARDS; card++) {
|
||||
uint64_t dl_carrier, ul_carrier;
|
||||
openair0_cfg[card].configFilename = NULL;
|
||||
openair0_cfg[card].threequarter_fs = frame_parms->threequarter_fs;
|
||||
openair0_cfg[card].sample_rate = frame_parms->samples_per_subframe * 1e3;
|
||||
openair0_cfg[card].samples_per_frame = frame_parms->samples_per_frame;
|
||||
|
||||
|
||||
@@ -237,6 +237,8 @@ int main(int argc, char *argv[])
|
||||
int max_ldpc_iterations = 5;
|
||||
int num_antennas_per_thread = 1;
|
||||
uint32_t log_format = 0;
|
||||
int threequarter_fs = 0;
|
||||
|
||||
if ((uniqCfg = load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY)) == 0) {
|
||||
exit_fun("[NR_ULSIM] Error, configuration module init failed\n");
|
||||
}
|
||||
@@ -351,7 +353,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
case 'k':
|
||||
printf("Setting threequarter_fs_flag\n");
|
||||
openair0_cfg[0].threequarter_fs= 1;
|
||||
threequarter_fs = 1;
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
@@ -584,7 +586,7 @@ int main(int argc, char *argv[])
|
||||
uint32_t samples;
|
||||
get_samplerate_and_bw(mu,
|
||||
N_RB_DL,
|
||||
openair0_cfg[0].threequarter_fs,
|
||||
threequarter_fs,
|
||||
&sampling_frequency,
|
||||
&samples,
|
||||
&tx_bandwidth,
|
||||
|
||||
@@ -204,8 +204,6 @@ typedef struct split7_config {
|
||||
typedef struct openair0_config {
|
||||
//! Module ID for this configuration
|
||||
int Mod_id;
|
||||
//! device log level
|
||||
int log_level;
|
||||
//! duplexing mode
|
||||
duplex_mode_t duplex_mode;
|
||||
//! number of downlink resource blocks
|
||||
@@ -292,8 +290,6 @@ typedef struct openair0_config {
|
||||
double rx_sample_rate;
|
||||
//! the sample rate for transmit.
|
||||
double tx_sample_rate;
|
||||
//! check for threequarter sampling rate
|
||||
int8_t threequarter_fs;
|
||||
//! Flag to indicate this configuration is for NR
|
||||
int nr_flag;
|
||||
//! NR band number
|
||||
|
||||
@@ -617,7 +617,6 @@ void dump_dev(openair0_device *device)
|
||||
eth_state_t *eth = (eth_state_t*)device->priv;
|
||||
|
||||
printf("Ethernet device interface %i configuration:\n" ,device->openair0_cfg->Mod_id);
|
||||
printf(" Log level is %i :\n" ,device->openair0_cfg->log_level);
|
||||
printf(" RB number: %i, sample rate: %lf \n" ,
|
||||
device->openair0_cfg->num_rb_dl, device->openair0_cfg->sample_rate);
|
||||
printf(" RAU configured for %i tx/%i rx channels)\n",
|
||||
|
||||
@@ -884,8 +884,6 @@ static bool set_fh_config(void *mplane_api, int ru_idx, int num_rus, enum xran_c
|
||||
for (int i = 1; i < oai0->rx_num_channels; ++i)
|
||||
DevAssert(oai0->rx_freq[0] == oai0->rx_freq[i]);
|
||||
DevAssert(oai0->nr_band > 0);
|
||||
AssertFatal(oai0->threequarter_fs == 0, "cannot use three-quarter sampling with O-RAN 7.2 split\n");
|
||||
|
||||
paramdef_t FHconfigs[] = ORAN_FH_DESC;
|
||||
paramlist_def_t FH_ConfigList = {CONFIG_STRING_ORAN_FH};
|
||||
char aprefix[MAX_OPTNAME_SIZE] = {0};
|
||||
|
||||
Reference in New Issue
Block a user