Merge remote-tracking branch 'origin/develop-nr' into nr_prach
Conflicts: cmake_targets/CMakeLists.txt cmake_targets/build_oai executables/nr-ue.c openair1/PHY/INIT/nr_init.c openair1/PHY/NR_TRANSPORT/nr_dlsch.c openair1/PHY/NR_TRANSPORT/nr_dlsch.h openair1/PHY/NR_TRANSPORT/nr_transport_common_proto.h openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c openair1/PHY/defs_gNB.h openair1/SCHED_NR/phy_procedures_nr_gNB.c openair1/SCHED_NR_UE/defs.h openair1/SCHED_NR_UE/fapi_nr_ue_l1.c openair1/SCHED_NR_UE/phy_procedures_nr_ue.c openair1/SIMULATION/NR_PHY/dlsim.c openair1/SIMULATION/NR_PHY/pucchsim.c openair1/SIMULATION/NR_PHY/ulschsim.c openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
This commit is contained in:
@@ -1124,6 +1124,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
|
||||
device->trx_set_gains_func = trx_brf_set_gains;
|
||||
device->openair0_cfg = openair0_cfg;
|
||||
device->priv = (void *)brf;
|
||||
device->uhd_set_thread_priority = NULL;
|
||||
|
||||
calibrate_rf(device);
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
int set_device(openair0_device *device) {
|
||||
|
||||
switch (device->type) {
|
||||
|
||||
|
||||
case EXMIMO_DEV:
|
||||
LOG_I(HW,"[%s] has loaded EXPRESS MIMO device.\n",((device->host_type == RAU_HOST) ? "RAU": "RRU"));
|
||||
break;
|
||||
@@ -95,6 +95,8 @@ int set_transport(openair0_device *device) {
|
||||
|
||||
}
|
||||
typedef int(*devfunc_t)(openair0_device *, openair0_config_t *, eth_params_t *);
|
||||
//loader_shlibfunc_t shlib_fdesc[2];
|
||||
|
||||
/* look for the interface library and load it */
|
||||
int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_params_t * cfg, uint8_t flag) {
|
||||
|
||||
@@ -102,9 +104,9 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
|
||||
int ret=0;
|
||||
char *libname;
|
||||
if (flag == RAU_LOCAL_RADIO_HEAD) {
|
||||
if (getenv("RFSIMULATOR") != NULL)
|
||||
libname="rfsimulator";
|
||||
else
|
||||
if (getenv("RFSIMULATOR") != NULL)
|
||||
libname="rfsimulator";
|
||||
else
|
||||
libname=OAI_RF_LIBNAME;
|
||||
shlib_fdesc[0].fname="device_init";
|
||||
} else {
|
||||
@@ -122,6 +124,7 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
|
||||
|
||||
|
||||
|
||||
|
||||
int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cfg) {
|
||||
|
||||
int rc=0;
|
||||
|
||||
@@ -387,6 +387,10 @@ struct openair0_device_t {
|
||||
* \param arg pointer to capabilities or configuration
|
||||
*/
|
||||
void (*configure_rru)(int idx, void *arg);
|
||||
|
||||
/*! \brief set UHD thread priority
|
||||
*/
|
||||
void (*uhd_set_thread_priority)(void);
|
||||
};
|
||||
|
||||
/* type of device init function, implemented in shared lib */
|
||||
@@ -405,7 +409,7 @@ typedef int(*oai_transport_initfunc_t)(openair0_device *device, openair0_config_
|
||||
|
||||
#define OPTION_LZ4 0x00000001 // LZ4 compression (option_value is set to compressed size)
|
||||
|
||||
#define sample_t uint32_t // 2*16 bits complex number
|
||||
#define sample_t struct complex16 // 2*16 bits complex number
|
||||
|
||||
typedef struct {
|
||||
uint64_t magic; // Magic value (see defines above)
|
||||
@@ -445,6 +449,8 @@ int openair0_set_rx_frequencies(openair0_device *device, openair0_config_t *open
|
||||
#define gettid() syscall(__NR_gettid)
|
||||
/*@}*/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -401,6 +401,7 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, eth
|
||||
device->trx_stop_func = trx_eth_stop;
|
||||
device->trx_set_freq_func = trx_eth_set_freq;
|
||||
device->trx_set_gains_func = trx_eth_set_gains;
|
||||
device->uhd_set_thread_priority = NULL;
|
||||
|
||||
if (eth->flags == ETH_RAW_MODE) {
|
||||
device->trx_write_func = trx_eth_write_raw;
|
||||
|
||||
@@ -772,6 +772,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
|
||||
device->trx_set_gains_func = trx_exmimo_set_gains;
|
||||
device->openair0_cfg = openair0_cfg;
|
||||
device->priv = (void *)exm;
|
||||
device->uhd_set_thread_priority = NULL;
|
||||
|
||||
|
||||
printf("EXMIMO2: Getting addresses for memory-mapped DMA\n");
|
||||
|
||||
@@ -405,6 +405,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg){
|
||||
device->trx_stop_func = trx_lms_stop;
|
||||
device->trx_set_freq_func = trx_lms_set_freq;
|
||||
device->trx_set_gains_func = trx_lms_set_gains;
|
||||
device->uhd_set_thread_priority = NULL;
|
||||
|
||||
device->openair0_cfg = openair0_cfg;
|
||||
|
||||
|
||||
@@ -706,6 +706,7 @@ int openair0_dev_init_sodera(openair0_device* device, openair0_config_t *openair
|
||||
device->trx_stop_func = trx_sodera_stop;
|
||||
device->trx_set_freq_func = trx_sodera_set_freq;
|
||||
device->trx_set_gains_func = trx_sodera_set_gains;
|
||||
device->uhd_set_thread_priority = NULL;
|
||||
|
||||
s->sample_rate = openair0_cfg[0].sample_rate;
|
||||
s->channelscount = openair0_cfg[0].rx_num_channels;
|
||||
|
||||
@@ -591,7 +591,15 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
|
||||
for (int j=0; j<nsamps2; j++) {
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
#ifdef __AVX2__
|
||||
((__m256i *)buff[i])[j] = _mm256_srai_epi16(buff_tmp[i][j],4);
|
||||
// FK: in some cases the buffer might not be 32 byte aligned, so we cannot use avx2
|
||||
|
||||
if ((((uintptr_t) buff[i])&0x1F)==0) {
|
||||
((__m256i *)buff[i])[j] = _mm256_srai_epi16(buff_tmp[i][j],4);
|
||||
}
|
||||
else {
|
||||
((__m128i *)buff[i])[2*j] = _mm_srai_epi16(((__m128i*)buff_tmp[i])[j],4);
|
||||
((__m128i *)buff[i])[2*j+1] = _mm_srai_epi16(((__m128i*)buff_tmp[i])[2*j+1],4);
|
||||
}
|
||||
#else
|
||||
((__m128i *)buff[i])[j] = _mm_srai_epi16(buff_tmp[i][j],4);
|
||||
#endif
|
||||
@@ -845,6 +853,10 @@ void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index,int bw_
|
||||
|
||||
if (bw_gain_adjust==1) {
|
||||
switch ((int)openair0_cfg[0].sample_rate) {
|
||||
|
||||
case 46080000:
|
||||
break;
|
||||
|
||||
case 30720000:
|
||||
break;
|
||||
|
||||
@@ -870,7 +882,7 @@ void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index,int bw_
|
||||
|
||||
default:
|
||||
LOG_E(PHY,"unknown sampling rate %d\n",(int)openair0_cfg[0].sample_rate);
|
||||
exit(-1);
|
||||
//exit(-1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -907,6 +919,12 @@ int trx_usrp_reset_stats(openair0_device *device) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
/*! \brief Set uhd priority
|
||||
*/
|
||||
static void uhd_set_thread_priority(void) {
|
||||
uhd::set_thread_priority_safe(1.0);
|
||||
}
|
||||
|
||||
#if defined(USRP_REC_PLAY)
|
||||
extern "C" {
|
||||
/*! \brief Initializer for USRP record/playback config
|
||||
@@ -1044,6 +1062,7 @@ extern "C" {
|
||||
device->trx_set_freq_func = trx_usrp_set_freq;
|
||||
device->trx_set_gains_func = trx_usrp_set_gains;
|
||||
device->openair0_cfg = openair0_cfg;
|
||||
device->uhd_set_thread_priority = uhd_set_thread_priority;
|
||||
std::cerr << "USRP device initialized in subframes replay mode for " << u_sf_loops << " loops. Use mmap="
|
||||
<< use_mmap << std::endl;
|
||||
} else {
|
||||
@@ -1158,6 +1177,13 @@ extern "C" {
|
||||
openair0_cfg[0].rx_bw = 40e6;
|
||||
break;
|
||||
|
||||
case 46080000:
|
||||
//openair0_cfg[0].samples_per_packet = 1024;
|
||||
openair0_cfg[0].tx_sample_advance = 115;
|
||||
openair0_cfg[0].tx_bw = 40e6;
|
||||
openair0_cfg[0].rx_bw = 40e6;
|
||||
break;
|
||||
|
||||
case 30720000:
|
||||
// from usrp_time_offset
|
||||
//openair0_cfg[0].samples_per_packet = 2048;
|
||||
@@ -1210,7 +1236,15 @@ extern "C" {
|
||||
}
|
||||
|
||||
switch ((int)openair0_cfg[0].sample_rate) {
|
||||
case 30720000:
|
||||
case 46080000:
|
||||
s->usrp->set_master_clock_rate(46.08e6);
|
||||
//openair0_cfg[0].samples_per_packet = 1024;
|
||||
openair0_cfg[0].tx_sample_advance = 115;
|
||||
openair0_cfg[0].tx_bw = 40e6;
|
||||
openair0_cfg[0].rx_bw = 40e6;
|
||||
break;
|
||||
|
||||
case 30720000:
|
||||
s->usrp->set_master_clock_rate(30.72e6);
|
||||
//openair0_cfg[0].samples_per_packet = 1024;
|
||||
openair0_cfg[0].tx_sample_advance = 115;
|
||||
@@ -1361,6 +1395,7 @@ extern "C" {
|
||||
device->trx_set_freq_func = trx_usrp_set_freq;
|
||||
device->trx_set_gains_func = trx_usrp_set_gains;
|
||||
device->openair0_cfg = openair0_cfg;
|
||||
device->uhd_set_thread_priority = uhd_set_thread_priority;
|
||||
s->sample_rate = openair0_cfg[0].sample_rate;
|
||||
|
||||
// TODO:
|
||||
@@ -1462,5 +1497,7 @@ extern "C" {
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/*@}*/
|
||||
|
||||
@@ -132,6 +132,7 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg,
|
||||
device->trx_set_gains_func = mobipass_set_gains;
|
||||
device->trx_write_func = mobipass_write;
|
||||
device->trx_read_func = mobipass_read;
|
||||
device->uhd_set_thread_priority = NULL;
|
||||
|
||||
device->priv = mobi;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ Then, you can use it freely
|
||||
|
||||
# Usage
|
||||
Setting the env variable RFSIMULATOR enables the RF board simulator
|
||||
It should the set to "enb" in the eNB
|
||||
It should the set to "server" in the eNB or gNB
|
||||
|
||||
## 4G case
|
||||
For the UE, it should be set to the IP address of the eNB
|
||||
@@ -62,6 +62,19 @@ sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem --numerology 1 -r 106 -C 3510000000
|
||||
Of course, set the gNB machine IP address if the UE and the gNB are not on the same machine
|
||||
In UE, you can add "-d" to get the softscope
|
||||
|
||||
### Channel simulation
|
||||
The RF channel simulator is called.
|
||||
In current version all channel paramters are hard coded in the call to:
|
||||
new_channel_desc_scm(bridge->tx_num_channels,bridge->rx_num_channels,
|
||||
AWGN,
|
||||
bridge->sample_rate,
|
||||
bridge->tx_bw,
|
||||
0.0, // forgetting_factor
|
||||
0, // maybe used for TA
|
||||
0); // path_loss in dB
|
||||
Only the input noise can be changed on command line with -s parameter.
|
||||
With path loss = 0 set "-s 5" to see a little noise
|
||||
|
||||
#Caveacts
|
||||
Still issues in power control: txgain, rxgain are not used
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
copyleft: OpenAirInterface Software Alliance and it's licence
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
* Open issues and limitations
|
||||
* The read and write should be called in the same thread, that is not new USRP UHD design
|
||||
* When the opposite side switch from passive reading to active R+Write, the synchro is not fully deterministic
|
||||
@@ -27,43 +27,134 @@
|
||||
#include "common_lib.h"
|
||||
#include <openair1/PHY/defs_eNB.h>
|
||||
#include "openair1/PHY/defs_UE.h"
|
||||
#include <openair1/SIMULATION/TOOLS/sim.h>
|
||||
|
||||
#define PORT 4043 //TCP port for this simulator
|
||||
#define CirSize 3072000 // 100ms is enough
|
||||
#define sample_t uint32_t // 2*16 bits complex number
|
||||
#define sampleToByte(a,b) ((a)*(b)*sizeof(sample_t))
|
||||
#define byteToSample(a,b) ((a)/(sizeof(sample_t)*(b)))
|
||||
|
||||
#define sample_t uint32_t //2*16 bits complex number
|
||||
#define MAX_SIMULATION_CONNECTED_NODES 5
|
||||
#define GENERATE_CHANNEL 10 //each frame in DL
|
||||
|
||||
// Fixme: datamodel, external variables in .h files, ...
|
||||
#include <common/ran_context.h>
|
||||
extern double snr_dB;
|
||||
extern RAN_CONTEXT_t RC;
|
||||
//
|
||||
|
||||
pthread_mutex_t Sockmutex;
|
||||
|
||||
typedef struct buffer_s {
|
||||
int conn_sock;
|
||||
bool alreadyRead;
|
||||
uint64_t lastReceivedTS;
|
||||
openair0_timestamp lastReceivedTS;
|
||||
openair0_timestamp lastWroteTS;
|
||||
bool headerMode;
|
||||
samplesBlockHeader_t th;
|
||||
char *transferPtr;
|
||||
uint64_t remainToTransfer;
|
||||
char *circularBufEnd;
|
||||
sample_t *circularBuf;
|
||||
channel_desc_t *channel_model;
|
||||
} buffer_t;
|
||||
|
||||
typedef struct {
|
||||
int listen_sock, epollfd;
|
||||
uint64_t nextTimestamp;
|
||||
openair0_timestamp nextTimestamp;
|
||||
uint64_t typeStamp;
|
||||
char *ip;
|
||||
int saveIQfile;
|
||||
buffer_t buf[FD_SETSIZE];
|
||||
int rx_num_channels;
|
||||
int tx_num_channels;
|
||||
double sample_rate;
|
||||
double tx_bw;
|
||||
} rfsimulator_state_t;
|
||||
|
||||
/*
|
||||
Legacy study:
|
||||
The parameters are:
|
||||
gain&loss (decay, signal power, ...)
|
||||
either a fixed gain in dB, a target power in dBm or ACG (automatic control gain) to a target average
|
||||
=> don't redo the AGC, as it was used in UE case, that must have a AGC inside the UE
|
||||
will be better to handle the "set_gain()" called by UE to apply it's gain (enable test of UE power loop)
|
||||
lin_amp = pow(10.0,.05*txpwr_dBm)/sqrt(nb_tx_antennas);
|
||||
a lot of operations in legacy, grouped in one simulation signal decay: txgain*decay*rxgain
|
||||
|
||||
multi_path (auto convolution, ISI, ...)
|
||||
either we regenerate the channel (call again random_channel(desc,0)), or we keep it over subframes
|
||||
legacy: we regenerate each sub frame in UL, and each frame only in DL
|
||||
*/
|
||||
void rxAddInput( struct complex16 *input_sig, struct complex16 *after_channel_sig,
|
||||
int rxAnt,
|
||||
channel_desc_t *channelDesc,
|
||||
int nbSamples,
|
||||
uint64_t TS
|
||||
) {
|
||||
// channelDesc->path_loss_dB should contain the total path gain
|
||||
// so, in actual RF: tx gain + path loss + rx gain (+antenna gain, ...)
|
||||
// UE and NB gain control to be added
|
||||
// Fixme: not sure when it is "volts" so dB is 20*log10(...) or "power", so dB is 10*log10(...)
|
||||
const double pathLossLinear = pow(10,channelDesc->path_loss_dB/20.0);
|
||||
// Energy in one sample to calibrate input noise
|
||||
//Fixme: modified the N0W computation, not understand the origin value
|
||||
const double KT=1.38e-23*290; //Boltzman*temperature
|
||||
// sampling rate is linked to acquisition band (the input pass band filter)
|
||||
const double noise_figure_watt = KT*channelDesc->sampling_rate;
|
||||
// Fixme: how to convert a noise in Watt into a 12 bits value out of the RF ADC ?
|
||||
// the parameter "-s" is declared as SNR, but the input power is not well defined
|
||||
// −132.24 dBm is a LTE subcarrier noise, that was used in origin code (15KHz BW thermal noise)
|
||||
const double rxGain= 132.24 - snr_dB;
|
||||
// sqrt(4*noise_figure_watt) is the thermal noise factor (volts)
|
||||
// fixme: the last constant is pure trial results to make decent noise
|
||||
const double noise_per_sample = sqrt(4*noise_figure_watt) * pow(10,rxGain/20) *10;
|
||||
// Fixme: we don't fill the offset length samples at begining ?
|
||||
// anyway, in today code, channel_offset=0
|
||||
const int dd = abs(channelDesc->channel_offset);
|
||||
const int nbTx=channelDesc->nb_tx;
|
||||
|
||||
for (int i=0; i<((int)nbSamples-dd); i++) {
|
||||
struct complex16 *out_ptr=after_channel_sig+dd+i;
|
||||
struct complex rx_tmp= {0};
|
||||
|
||||
for (int txAnt=0; txAnt < nbTx; txAnt++) {
|
||||
const struct complex *channelModel= channelDesc->ch[rxAnt+(txAnt*channelDesc->nb_rx)];
|
||||
|
||||
//const struct complex *channelModelEnd=channelModel+channelDesc->channel_length;
|
||||
for (int l = 0; l<(int)channelDesc->channel_length; l++) {
|
||||
// let's assume TS+i >= l
|
||||
// fixme: the rfsimulator current structure is interleaved antennas
|
||||
// this has been designed to not have to wait a full block transmission
|
||||
// but it is not very usefull
|
||||
// it would be better to split out each antenna in a separate flow
|
||||
// that will allow to mix ru antennas freely
|
||||
struct complex16 tx16=input_sig[((TS+i-l)*nbTx+txAnt)%CirSize];
|
||||
rx_tmp.x += tx16.r * channelModel[l].x - tx16.i * channelModel[l].y;
|
||||
rx_tmp.y += tx16.i * channelModel[l].x + tx16.r * channelModel[l].y;
|
||||
} //l
|
||||
}
|
||||
|
||||
out_ptr->r += round(rx_tmp.x*pathLossLinear + noise_per_sample*gaussdouble(0.0,1.0));
|
||||
out_ptr->i += round(rx_tmp.y*pathLossLinear + noise_per_sample*gaussdouble(0.0,1.0));
|
||||
out_ptr++;
|
||||
}
|
||||
|
||||
if ( (TS*nbTx)%CirSize+nbSamples <= CirSize )
|
||||
// Cast to a wrong type for compatibility !
|
||||
LOG_D(HW,"Input power %f, output power: %f, channel path loss %f, noise coeff: %f \n",
|
||||
10*log10((double)signal_energy((int32_t *)&input_sig[(TS*nbTx)%CirSize], nbSamples)),
|
||||
10*log10((double)signal_energy((int32_t *)after_channel_sig, nbSamples)),
|
||||
channelDesc->path_loss_dB,
|
||||
10*log10(noise_per_sample));
|
||||
}
|
||||
|
||||
void allocCirBuf(rfsimulator_state_t *bridge, int sock) {
|
||||
buffer_t *ptr=&bridge->buf[sock];
|
||||
AssertFatal ( (ptr->circularBuf=(sample_t *) malloc(sampleToByte(CirSize,1))) != NULL, "");
|
||||
ptr->circularBufEnd=((char *)ptr->circularBuf)+sampleToByte(CirSize,1);
|
||||
ptr->conn_sock=sock;
|
||||
ptr->alreadyRead=false;
|
||||
ptr->lastReceivedTS=0;
|
||||
ptr->lastWroteTS=0;
|
||||
ptr->headerMode=true;
|
||||
ptr->transferPtr=(char *)&ptr->th;
|
||||
ptr->remainToTransfer=sizeof(samplesBlockHeader_t);
|
||||
@@ -73,12 +164,35 @@ void allocCirBuf(rfsimulator_state_t *bridge, int sock) {
|
||||
ev.events = EPOLLIN | EPOLLRDHUP;
|
||||
ev.data.fd = sock;
|
||||
AssertFatal(epoll_ctl(bridge->epollfd, EPOLL_CTL_ADD, sock, &ev) != -1, "");
|
||||
// create channel simulation model for this mode reception
|
||||
// snr_dB is pure global, coming from configuration paramter "-s"
|
||||
// Fixme: referenceSignalPower should come from the right place
|
||||
// but the datamodel is inconsistant
|
||||
// legacy: RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower
|
||||
// (must not come from ru[]->frame_parms as it doesn't belong to ru !!!)
|
||||
// Legacy sets it as:
|
||||
// ptr->channel_model->path_loss_dB = -132.24 + snr_dB - RC.ru[0]->frame_parms->pdsch_config_common.referenceSignalPower;
|
||||
// we use directly the paramter passed on the command line ("-s")
|
||||
// the value channel_model->path_loss_dB seems only a storage place (new_channel_desc_scm() only copy the passed value)
|
||||
// Legacy changes directlty the variable channel_model->path_loss_dB place to place
|
||||
// while calling new_channel_desc_scm() with path losses = 0
|
||||
ptr->channel_model=new_channel_desc_scm(bridge->tx_num_channels,bridge->rx_num_channels,
|
||||
AWGN,
|
||||
bridge->sample_rate,
|
||||
bridge->tx_bw,
|
||||
0.0, // forgetting_factor
|
||||
0, // maybe used for TA
|
||||
0); // path_loss in dB
|
||||
random_channel(ptr->channel_model,false);
|
||||
}
|
||||
|
||||
void removeCirBuf(rfsimulator_state_t *bridge, int sock) {
|
||||
AssertFatal( epoll_ctl(bridge->epollfd, EPOLL_CTL_DEL, sock, NULL) != -1, "");
|
||||
close(sock);
|
||||
free(bridge->buf[sock].circularBuf);
|
||||
// Fixme: no free_channel_desc_scm(bridge->buf[sock].channel_model) implemented
|
||||
// a lot of mem leaks
|
||||
free(bridge->buf[sock].channel_model);
|
||||
memset(&bridge->buf[sock], 0, sizeof(buffer_t));
|
||||
bridge->buf[sock].conn_sock=-1;
|
||||
}
|
||||
@@ -126,8 +240,7 @@ void fullwrite(int fd, void *_buf, ssize_t count, rfsimulator_state_t *t) {
|
||||
}
|
||||
|
||||
AssertFatal(fd>=0 && _buf && count >0 && t,
|
||||
"Bug: %d/%p/%zd/%p", fd, _buf, count, t);
|
||||
|
||||
"Bug: %d/%p/%zd/%p", fd, _buf, count, t);
|
||||
char *buf = _buf;
|
||||
ssize_t l;
|
||||
setblocking(fd, notBlocking);
|
||||
@@ -140,8 +253,8 @@ void fullwrite(int fd, void *_buf, ssize_t count, rfsimulator_state_t *t) {
|
||||
continue;
|
||||
|
||||
if(errno==EAGAIN) {
|
||||
// The opposite side is saturated
|
||||
// we read incoming sockets meawhile waiting
|
||||
// The opposite side is saturated
|
||||
// we read incoming sockets meawhile waiting
|
||||
flushInput(t, 5);
|
||||
continue;
|
||||
} else
|
||||
@@ -206,21 +319,22 @@ sin_addr:
|
||||
|
||||
setblocking(sock, notBlocking);
|
||||
allocCirBuf(t, sock);
|
||||
t->buf[sock].alreadyRead=true; // UE will start blocking on read
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64_t lastW=-1;
|
||||
int rfsimulator_write(openair0_device *device, openair0_timestamp timestamp, void **samplesVoid, int nsamps, int nbAnt, int flags) {
|
||||
rfsimulator_state_t *t = device->priv;
|
||||
LOG_D(HW,"sending %d samples at time: %ld\n", nsamps, timestamp);
|
||||
|
||||
for (int i=0; i<FD_SETSIZE; i++) {
|
||||
buffer_t *ptr=&t->buf[i];
|
||||
|
||||
if (ptr->conn_sock >= 0 ) {
|
||||
for (int i=0; i<FD_SETSIZE; i++) {
|
||||
buffer_t *b=&t->buf[i];
|
||||
|
||||
if (b->conn_sock >= 0 ) {
|
||||
if ( abs((double)b->lastWroteTS-timestamp) > (double)CirSize)
|
||||
LOG_E(HW,"Tx/Rx shift too large Tx:%lu, Rx:%lu\n", b->lastWroteTS, b->lastReceivedTS);
|
||||
samplesBlockHeader_t header= {t->typeStamp, nsamps, nbAnt, timestamp};
|
||||
fullwrite(ptr->conn_sock,&header, sizeof(header), t);
|
||||
fullwrite(b->conn_sock,&header, sizeof(header), t);
|
||||
sample_t tmpSamples[nsamps][nbAnt];
|
||||
|
||||
for(int a=0; a<nbAnt; a++) {
|
||||
@@ -230,16 +344,19 @@ int rfsimulator_write(openair0_device *device, openair0_timestamp timestamp, voi
|
||||
tmpSamples[s][a]=in[s];
|
||||
}
|
||||
|
||||
if (ptr->conn_sock >= 0 )
|
||||
fullwrite(ptr->conn_sock, (void *)tmpSamples, sampleToByte(nsamps,nbAnt), t);
|
||||
if (b->conn_sock >= 0 ) {
|
||||
fullwrite(b->conn_sock, (void *)tmpSamples, sampleToByte(nsamps,nbAnt), t);
|
||||
b->lastWroteTS=timestamp+nsamps;
|
||||
}
|
||||
}
|
||||
}
|
||||
lastW=timestamp;
|
||||
|
||||
LOG_D(HW,"sent %d samples at time: %ld->%ld, energy in first antenna: %d\n",
|
||||
nsamps, timestamp, timestamp+nsamps, signal_energy(samplesVoid[0], nsamps) );
|
||||
// Let's verify we don't have incoming data
|
||||
// This is mandatory when the opposite side don't transmit
|
||||
flushInput(t, 0);
|
||||
pthread_mutex_unlock(&Sockmutex);
|
||||
return nsamps;
|
||||
}
|
||||
|
||||
@@ -250,9 +367,9 @@ static bool flushInput(rfsimulator_state_t *t, int timeout) {
|
||||
int nfds = epoll_wait(t->epollfd, events, FD_SETSIZE, timeout);
|
||||
|
||||
if ( nfds==-1 ) {
|
||||
if ( errno==EINTR || errno==EAGAIN )
|
||||
if ( errno==EINTR || errno==EAGAIN ) {
|
||||
return false;
|
||||
else
|
||||
} else
|
||||
AssertFatal(false,"error in epoll_wait\n");
|
||||
}
|
||||
|
||||
@@ -309,32 +426,35 @@ static bool flushInput(rfsimulator_state_t *t, int timeout) {
|
||||
AssertFatal( (t->typeStamp == UE_MAGICDL_FDD && b->th.magic==ENB_MAGICDL_FDD) ||
|
||||
(t->typeStamp == ENB_MAGICDL_FDD && b->th.magic==UE_MAGICDL_FDD), "Socket Error in protocol");
|
||||
b->headerMode=false;
|
||||
b->alreadyRead=true;
|
||||
|
||||
if ( b->lastReceivedTS != b->th.timestamp) {
|
||||
int nbAnt= b->th.nbAnt;
|
||||
|
||||
for (uint64_t index=b->lastReceivedTS; index < b->th.timestamp; index++ )
|
||||
for (int a=0; a < nbAnt; a++)
|
||||
b->circularBuf[(index*nbAnt+a)%CirSize]=0;
|
||||
for (uint64_t index=b->lastReceivedTS; index < b->th.timestamp; index++ ) {
|
||||
for (int a=0; a < nbAnt; a++) {
|
||||
b->circularBuf[(index*nbAnt+a)%CirSize].r=0;
|
||||
b->circularBuf[(index*nbAnt+a)%CirSize].i=0;
|
||||
}
|
||||
}
|
||||
|
||||
LOG_W(HW,"gap of: %ld in reception\n", b->th.timestamp-b->lastReceivedTS );
|
||||
}
|
||||
|
||||
b->lastReceivedTS=b->th.timestamp;
|
||||
AssertFatal(lastW == -1 || ( abs((double)lastW-b->lastReceivedTS) < (double)CirSize),
|
||||
"Tx/Rx shift too large Tx:%lu, Rx:%lu\n", lastW, b->lastReceivedTS);
|
||||
AssertFatal(b->lastWroteTS == 0 || ( abs((double)b->lastWroteTS-b->lastReceivedTS) < (double)CirSize),
|
||||
"Tx/Rx shift too large Tx:%lu, Rx:%lu\n", b->lastWroteTS, b->lastReceivedTS);
|
||||
b->transferPtr=(char *)&b->circularBuf[b->lastReceivedTS%CirSize];
|
||||
b->remainToTransfer=sampleToByte(b->th.size, b->th.nbAnt);
|
||||
}
|
||||
|
||||
if ( b->headerMode==false ) {
|
||||
LOG_D(HW,"Set b->lastReceivedTS %ld\n", b->lastReceivedTS);
|
||||
LOG_D(HW,"Set b->lastReceivedTS %ld\n", b->lastReceivedTS);
|
||||
b->lastReceivedTS=b->th.timestamp+b->th.size-byteToSample(b->remainToTransfer,b->th.nbAnt);
|
||||
// First block in UE, resync with the eNB current TS
|
||||
if ( t->nextTimestamp == 0 )
|
||||
t->nextTimestamp=b->lastReceivedTS-b->th.size;
|
||||
|
||||
|
||||
// First block in UE, resync with the eNB current TS
|
||||
if ( t->nextTimestamp == 0 )
|
||||
t->nextTimestamp=b->lastReceivedTS-b->th.size;
|
||||
|
||||
if ( b->remainToTransfer==0) {
|
||||
LOG_D(HW,"Completed block reception: %ld\n", b->lastReceivedTS);
|
||||
b->headerMode=true;
|
||||
@@ -351,10 +471,10 @@ static bool flushInput(rfsimulator_state_t *t, int timeout) {
|
||||
|
||||
int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimestamp, void **samplesVoid, int nsamps, int nbAnt) {
|
||||
if (nbAnt != 1) {
|
||||
LOG_E(HW, "rfsimulator: only 1 antenna tested\n");
|
||||
exit(1);
|
||||
LOG_W(HW, "rfsimulator: only 1 antenna tested\n");
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&Sockmutex);
|
||||
rfsimulator_state_t *t = device->priv;
|
||||
LOG_D(HW, "Enter rfsimulator_read, expect %d samples, will release at TS: %ld\n", nsamps, t->nextTimestamp+nsamps);
|
||||
// deliver data from received data
|
||||
@@ -374,21 +494,40 @@ int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimestamp, vo
|
||||
t->nextTimestamp+=nsamps;
|
||||
LOG_W(HW,"Generated void samples for Rx: %ld\n", t->nextTimestamp);
|
||||
*ptimestamp = t->nextTimestamp-nsamps;
|
||||
pthread_mutex_unlock(&Sockmutex);
|
||||
return nsamps;
|
||||
}
|
||||
} else {
|
||||
|
||||
bool have_to_wait;
|
||||
|
||||
do {
|
||||
have_to_wait=false;
|
||||
|
||||
for ( int sock=0; sock<FD_SETSIZE; sock++) {
|
||||
if ( t->buf[sock].circularBuf && t->buf[sock].alreadyRead )
|
||||
if ( t->buf[sock].lastReceivedTS == 0 ||
|
||||
(t->nextTimestamp+nsamps) > t->buf[sock].lastReceivedTS ) {
|
||||
have_to_wait=true;
|
||||
break;
|
||||
buffer_t *b=&t->buf[sock];
|
||||
if ( b->circularBuf) {
|
||||
LOG_D(HW,"sock: %d, lastWroteTS: %lu, lastRecvTS: %lu, TS must be avail: %lu\n",
|
||||
sock, b->lastWroteTS,
|
||||
b->lastReceivedTS,
|
||||
t->nextTimestamp+nsamps);
|
||||
if ( b->lastReceivedTS > b->lastWroteTS ) {
|
||||
// The caller momdem (NB, UE, ...) must send Tx in advance, so we fill TX if Rx is in advance
|
||||
// This occurs for example when UE is in sync mode: it doesn't transmit
|
||||
// with USRP, it seems ok: if "tx stream" is off, we may consider it actually cuts the Tx power
|
||||
struct complex16 v={0};
|
||||
void *samplesVoid[b->th.nbAnt];
|
||||
for ( int i=0; i <b->th.nbAnt; i++)
|
||||
samplesVoid[i]=(void*)&v;
|
||||
rfsimulator_write(device, b->lastReceivedTS, samplesVoid, 1, b->th.nbAnt, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if ( b->circularBuf )
|
||||
if ( t->nextTimestamp+nsamps > b->lastReceivedTS ) {
|
||||
have_to_wait=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (have_to_wait)
|
||||
@@ -404,17 +543,25 @@ int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimestamp, vo
|
||||
for (int a=0; a<nbAnt; a++)
|
||||
memset(samplesVoid[a],0,sampleToByte(nsamps,1));
|
||||
|
||||
// Add all input signal in the output buffer
|
||||
// Add all input nodes signal in the output buffer
|
||||
for (int sock=0; sock<FD_SETSIZE; sock++) {
|
||||
buffer_t *ptr=&t->buf[sock];
|
||||
|
||||
if ( ptr->circularBuf && ptr->alreadyRead ) {
|
||||
for (int a=0; a<nbAnt; a++) {
|
||||
sample_t *out=(sample_t *)samplesVoid[a];
|
||||
if ( ptr->circularBuf ) {
|
||||
bool reGenerateChannel=false;
|
||||
|
||||
for ( int i=0; i < nsamps; i++ )
|
||||
out[i]+=ptr->circularBuf[((t->nextTimestamp+i)*nbAnt+a)%CirSize]<<1;
|
||||
}
|
||||
//fixme: when do we regenerate
|
||||
// it seems legacy behavior is: never in UL, each frame in DL
|
||||
if (reGenerateChannel)
|
||||
random_channel(ptr->channel_model,0);
|
||||
|
||||
for (int a=0; a<nbAnt; a++)
|
||||
rxAddInput( ptr->circularBuf, (struct complex16 *) samplesVoid[a],
|
||||
a,
|
||||
ptr->channel_model,
|
||||
nsamps,
|
||||
t->nextTimestamp
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,10 +571,9 @@ int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimestamp, vo
|
||||
nsamps,
|
||||
*ptimestamp, t->nextTimestamp,
|
||||
signal_energy(samplesVoid[0], nsamps));
|
||||
pthread_mutex_unlock(&Sockmutex);
|
||||
return nsamps;
|
||||
}
|
||||
|
||||
|
||||
int rfsimulator_request(openair0_device *device, void *msg, ssize_t msg_len) {
|
||||
abort();
|
||||
return 0;
|
||||
@@ -452,12 +598,11 @@ int rfsimulator_set_freq(openair0_device *device, openair0_config_t *openair0_cf
|
||||
int rfsimulator_set_gains(openair0_device *device, openair0_config_t *openair0_cfg) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
__attribute__((__visibility__("default")))
|
||||
int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
|
||||
//set_log(HW,OAILOG_DEBUG);
|
||||
//set_log(PHY,OAILOG_DEBUG);
|
||||
// to change the log level, use this on command line
|
||||
// --log_config.hw_log_level debug
|
||||
// (for phy layer, replace "hw" by "phy"
|
||||
rfsimulator_state_t *rfsimulator = (rfsimulator_state_t *)calloc(sizeof(rfsimulator_state_t),1);
|
||||
|
||||
if ((rfsimulator->ip=getenv("RFSIMULATOR")) == NULL ) {
|
||||
@@ -465,12 +610,14 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
pthread_mutex_init(&Sockmutex, NULL);
|
||||
|
||||
if ( strncasecmp(rfsimulator->ip,"enb",3) == 0 ||
|
||||
strncasecmp(rfsimulator->ip,"server",3) == 0 )
|
||||
rfsimulator->typeStamp = ENB_MAGICDL_FDD;
|
||||
else
|
||||
rfsimulator->typeStamp = UE_MAGICDL_FDD;
|
||||
|
||||
|
||||
LOG_I(HW,"rfsimulator: running as %s\n", rfsimulator-> typeStamp == ENB_MAGICDL_FDD ? "(eg)NB" : "UE");
|
||||
char *saveF;
|
||||
|
||||
@@ -495,6 +642,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
|
||||
device->trx_set_gains_func = rfsimulator_set_gains;
|
||||
device->trx_write_func = rfsimulator_write;
|
||||
device->trx_read_func = rfsimulator_read;
|
||||
device->uhd_set_thread_priority = NULL;
|
||||
/* let's pretend to be a b2x0 */
|
||||
device->type = USRP_B200_DEV;
|
||||
device->openair0_cfg=&openair0_cfg[0];
|
||||
@@ -504,5 +652,12 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
|
||||
rfsimulator->buf[i].conn_sock=-1;
|
||||
|
||||
AssertFatal((rfsimulator->epollfd = epoll_create1(0)) != -1,"");
|
||||
// initialize channel simulation
|
||||
rfsimulator->tx_num_channels=openair0_cfg->tx_num_channels;
|
||||
rfsimulator->rx_num_channels=openair0_cfg->rx_num_channels;
|
||||
rfsimulator->sample_rate=openair0_cfg->sample_rate;
|
||||
rfsimulator->tx_bw=openair0_cfg->tx_bw;
|
||||
randominit(0);
|
||||
set_taus_seed(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -267,6 +267,7 @@ int device_init(openair0_device* device, openair0_config_t *openair0_cfg)
|
||||
device->trx_set_gains_func = tcp_bridge_set_gains;
|
||||
device->trx_write_func = tcp_bridge_write;
|
||||
device->trx_read_func = tcp_bridge_read;
|
||||
device->uhd_set_thread_priority = NULL;
|
||||
|
||||
device->priv = tcp_bridge;
|
||||
|
||||
|
||||
@@ -313,6 +313,7 @@ int device_init(openair0_device* device, openair0_config_t *openair0_cfg)
|
||||
device->trx_set_freq_func = tcp_bridge_set_freq;
|
||||
device->trx_set_gains_func = tcp_bridge_set_gains;
|
||||
device->trx_write_func = tcp_bridge_write;
|
||||
device->uhd_set_thread_priority = NULL;
|
||||
|
||||
if (tcp_bridge->is_enb) {
|
||||
device->trx_read_func = tcp_bridge_read;
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
|
||||
|
||||
<ICIC_API>
|
||||
<SRUCTURE>
|
||||
<STRUCTNAME>SBMAP_CONF</STRUCTNAME>
|
||||
<PATH>openair2/LAYER2/MAC/defs.h</PATH>
|
||||
<FIELD>
|
||||
<FIELDNAME>sbmap[13]</FIELDNAME>
|
||||
<FIELDTYPE>unsigned char</FIELDTYPE>
|
||||
<DESC>subband map indicates to scheduler allowed SB for eNB</DESC>
|
||||
</FIELD>
|
||||
<FIELD>
|
||||
<FIELDNAME>periodicity</FIELDNAME>
|
||||
<FIELDTYPE>unsigned char</FIELDTYPE>
|
||||
<DESC>in millisecond indicate update instant</DESC>
|
||||
</FIELD>
|
||||
<FIELD>
|
||||
<FIELDNAME>first_subframe</FIELDNAME>
|
||||
<FIELDTYPE>unsigned char</FIELDTYPE>
|
||||
<DESC>...</DESC>
|
||||
</FIELD>
|
||||
<FIELD>
|
||||
<FIELDNAME>sb_size</FIELDNAME>
|
||||
<FIELDTYPE>unsigned char</FIELDTYPE>
|
||||
<DESC>number of PRB in this subband</DESC>
|
||||
</FIELD>
|
||||
<FIELD>
|
||||
<FIELDNAME>nb_active_sb</FIELDNAME>
|
||||
<FIELDTYPE>unsigned char</FIELDTYPE>
|
||||
<DESC>indicates the number of set subbands</DESC>
|
||||
</FIELD>
|
||||
</SRUCTURE>
|
||||
|
||||
<SRUCTURE>
|
||||
<STRUCTNAME>eNB_MAC_INST</STRUCTNAME>
|
||||
<PATH>openair2/LAYER2/MAC/defs.h</PATH>
|
||||
<FIELD>
|
||||
...
|
||||
</FIELD>
|
||||
<FIELD>
|
||||
<FIELDNAME>sbmap_conf</FIELDNAME>
|
||||
<FIELDTYPE>SBMAP_CONF</FIELDTYPE>
|
||||
<DESC>subband map configuration for each eNB</DESC>
|
||||
</FIELD>
|
||||
<INITPATH>openair2/LAYER2/MAC/main.c</INITPATH>
|
||||
<INITFUNC>mac_top_init</INITFUNC>
|
||||
</SRUCTURE>
|
||||
|
||||
<SRUCTURE>
|
||||
<STRUCTNAME>MAC_xface</STRUCTNAME>
|
||||
<PATH>openair2/PHY_INTERFACE/defs.h</PATH>
|
||||
<FIELD>
|
||||
...
|
||||
</FIELD>
|
||||
<FIELD>
|
||||
<FIELDNAME>(*get_SB_size)(unsigned char)</FIELDNAME>
|
||||
<FIELDTYPE>function pointer n</FIELDTYPE>
|
||||
<DESC>return the number of PRB supported in a subband configuration</DESC>
|
||||
</FIELD>
|
||||
<INITPATH>openair2/LAYER2/MAC/main.c</INITPATH>
|
||||
<INITFUNC>l2_init</INITFUNC>
|
||||
</SRUCTURE>
|
||||
|
||||
<FUNCTION>
|
||||
<FUNCNAME>Get_Cell_SBMap</FUNCNAME>
|
||||
<PARAMS>unsigned char Mod_id</PARAMS>
|
||||
<RETURN>void</RETURN>
|
||||
<PROTOPATH>openair2/LAYER2/MAC/defs.h</PROTOPATH>
|
||||
<IMPLPATH>openair2/LAYER2/MAC/eNB_scheduler.c</IMPLPATH>
|
||||
<DESC>imlements ICIC algo</DESC>
|
||||
</FUNCTION>
|
||||
<FUNCTION>
|
||||
<FUNCNAME>Get_SB_size</FUNCNAME>
|
||||
<PARAMS>unsigned char n_rb_dl</PARAMS>
|
||||
<RETURN>unsigned char </RETURN>
|
||||
<PROTOPATH>openair1/PHY/LTE_TRANSPORT/proto.h</PROTOPATH>
|
||||
<IMPLPATH>openair1/PHY/LTE_TRANSPORT/lte_mcs.c</IMPLPATH>
|
||||
<DESC>return the number of PRB supported in a subband configuration.</DESC>
|
||||
</FUNCTION>
|
||||
</ICIC_API>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,47 +0,0 @@
|
||||
\documentclass[a4paper]{book}
|
||||
\usepackage{a4wide}
|
||||
\usepackage{makeidx}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{multicol}
|
||||
\usepackage{float}
|
||||
\usepackage{textcomp}
|
||||
\usepackage{alltt}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amssymb}
|
||||
\ifx\pdfoutput\undefined
|
||||
\usepackage[ps2pdf,
|
||||
pagebackref=true,
|
||||
colorlinks=true,
|
||||
linkcolor=blue
|
||||
]{hyperref}
|
||||
\usepackage{pspicture}
|
||||
\else
|
||||
\usepackage[pdftex,
|
||||
pagebackref=true,
|
||||
colorlinks=true,
|
||||
linkcolor=blue
|
||||
]{hyperref}
|
||||
\fi
|
||||
\usepackage{doxygen}
|
||||
\usepackage{times}
|
||||
\makeindex
|
||||
\setcounter{tocdepth}{1}
|
||||
\renewcommand{\footrulewidth}{0.4pt}
|
||||
\begin{document}
|
||||
\begin{titlepage}
|
||||
\vspace*{7cm}
|
||||
\begin{center}
|
||||
{\Large openair Specifications }\\
|
||||
Phyiscal, Medium-Access, Radio-link Control, Packet Data Convergence Protocol and Radio Resource Control Layers\\
|
||||
\vspace*{1cm}
|
||||
{\large Generated by Doxygen 1.3.8}\\
|
||||
\vspace*{0.5cm}
|
||||
{\small Sun Oct 31 19:27:37 2004}\\
|
||||
\end{center}
|
||||
\end{titlepage}
|
||||
\clearemptydoublepage
|
||||
\pagenumbering{roman}
|
||||
\tableofcontents
|
||||
\clearemptydoublepage
|
||||
\pagenumbering{arabic}
|
||||
Binary file not shown.
@@ -0,0 +1,298 @@
|
||||
Active_gNBs = ( "gNB-Eurecom-5GNRBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_GNB";
|
||||
|
||||
gNB_name = "gNB-Eurecom-5GNRBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
|
||||
plmn_list = ({mcc = 208; mnc = 93; mnc_length = 2;});
|
||||
|
||||
tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "3GPP_gNODEB";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "TDD";
|
||||
DL_prefix_type = "NORMAL";
|
||||
UL_prefix_type = "NORMAL";
|
||||
eutra_band = 78;
|
||||
downlink_frequency = 3510000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 106;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
MIB_subCarrierSpacingCommon = 30;
|
||||
MIB_ssb_SubcarrierOffset = 0;
|
||||
MIB_dmrs_TypeA_Position = 2;
|
||||
pdcch_ConfigSIB1 = 0;
|
||||
SIB1_frequencyOffsetSSB = "khz5";
|
||||
SIB1_ssb_PeriodicityServingCell = 5;
|
||||
SIB1_ss_PBCH_BlockPower = -60;
|
||||
absoluteFrequencySSB = 0;
|
||||
DL_FreqBandIndicatorNR = 15;
|
||||
DL_absoluteFrequencyPointA = 15;
|
||||
DL_offsetToCarrier = 15;
|
||||
DL_SCS_SubcarrierSpacing = "kHz30";
|
||||
DL_SCS_SpecificCarrier_k0 = 0;
|
||||
DL_carrierBandwidth = 15;
|
||||
DL_locationAndBandwidth = 15;
|
||||
DL_BWP_SubcarrierSpacing = "kHz30";
|
||||
DL_BWP_prefix_type = "NORMAL";
|
||||
UL_FreqBandIndicatorNR = 15;
|
||||
UL_absoluteFrequencyPointA = 13;
|
||||
UL_additionalSpectrumEmission = 3;
|
||||
UL_p_Max = -1;
|
||||
UL_frequencyShift7p5khz = "TRUE";
|
||||
UL_offsetToCarrier = 10;
|
||||
UL_SCS_SubcarrierSpacing = "kHz30";
|
||||
UL_SCS_SpecificCarrier_k0 = 0;
|
||||
UL_carrierBandwidth = 15;
|
||||
UL_locationAndBandwidth = 15;
|
||||
UL_BWP_SubcarrierSpacing = "kHz30";
|
||||
UL_BWP_prefix_type = "NORMAL";
|
||||
UL_timeAlignmentTimerCommon = "infinity";
|
||||
ServingCellConfigCommon_n_TimingAdvanceOffset = "n0"
|
||||
ServingCellConfigCommon_ssb_PositionsInBurst_PR = 0x01;
|
||||
ServingCellConfigCommon_ssb_periodicityServingCell = 10;
|
||||
ServingCellConfigCommon_dmrs_TypeA_Position = 2;
|
||||
NIA_SubcarrierSpacing = "kHz15";
|
||||
ServingCellConfigCommon_ss_PBCH_BlockPower = -60;
|
||||
referenceSubcarrierSpacing = "kHz15";
|
||||
dl_UL_TransmissionPeriodicity = "ms0p5";
|
||||
nrofDownlinkSlots = 10;
|
||||
nrofDownlinkSymbols = 10;
|
||||
nrofUplinkSlots = 10;
|
||||
nrofUplinkSymbols = 10;
|
||||
rach_totalNumberOfRA_Preambles = 63;
|
||||
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice = "oneEighth";
|
||||
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth = 4;
|
||||
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth = 8;
|
||||
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf = 16;
|
||||
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one = 24;
|
||||
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two = 32;
|
||||
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four = 8;
|
||||
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight = 4;
|
||||
rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen = 2;
|
||||
rach_groupBconfigured = "ENABLE";
|
||||
rach_ra_Msg3SizeGroupA = 56;
|
||||
rach_messagePowerOffsetGroupB = "dB0";
|
||||
rach_numberOfRA_PreamblesGroupA = 32;
|
||||
rach_ra_ContentionResolutionTimer = 8;
|
||||
rsrp_ThresholdSSB = 64;
|
||||
rsrp_ThresholdSSB_SUL = 64;
|
||||
prach_RootSequenceIndex_choice = "l839";
|
||||
prach_RootSequenceIndex_l839 = 0;
|
||||
prach_RootSequenceIndex_l139 = 0;
|
||||
prach_msg1_SubcarrierSpacing = "kHz30";
|
||||
restrictedSetConfig = "unrestrictedSet";
|
||||
msg3_transformPrecoding = "ENABLE";
|
||||
prach_ConfigurationIndex = 10;
|
||||
prach_msg1_FDM = "one";
|
||||
prach_msg1_FrequencyStart = 10;
|
||||
zeroCorrelationZoneConfig = 10;
|
||||
preambleReceivedTargetPower = -150;
|
||||
preambleTransMax = 6;
|
||||
powerRampingStep = "dB0";
|
||||
ra_ResponseWindow = 8;
|
||||
groupHoppingEnabledTransformPrecoding = "ENABLE";
|
||||
msg3_DeltaPreamble = 0;
|
||||
p0_NominalWithGrant = 0;
|
||||
PUSCH_TimeDomainResourceAllocation_k2 = 0;
|
||||
PUSCH_TimeDomainResourceAllocation_mappingType = "typeA";
|
||||
PUSCH_TimeDomainResourceAllocation_startSymbolAndLength = 0;
|
||||
pucch_ResourceCommon = 0;
|
||||
pucch_GroupHopping = "neither";
|
||||
hoppingId = 0;
|
||||
p0_nominal = -30;
|
||||
PDSCH_TimeDomainResourceAllocation_k0 = 2;
|
||||
PDSCH_TimeDomainResourceAllocation_mappingType = "typeA";
|
||||
PDSCH_TimeDomainResourceAllocation_startSymbolAndLength = 0;
|
||||
rateMatchPatternId = 0;
|
||||
RateMatchPattern_patternType = "bitmaps";
|
||||
symbolsInResourceBlock = "oneSlot";
|
||||
periodicityAndPattern = 2;
|
||||
RateMatchPattern_controlResourceSet = 5;
|
||||
RateMatchPattern_subcarrierSpacing = "kHz30";
|
||||
RateMatchPattern_mode = "dynamic";
|
||||
controlResourceSetZero = 0;
|
||||
searchSpaceZero = 0;
|
||||
searchSpaceSIB1 = 10;
|
||||
searchSpaceOtherSystemInformation = 10;
|
||||
pagingSearchSpace = 10;
|
||||
ra_SearchSpace = 10;
|
||||
PDCCH_common_controlResourceSetId = 5;
|
||||
PDCCH_common_ControlResourceSet_duration = 2;
|
||||
PDCCH_cce_REG_MappingType = "nonInterleaved";
|
||||
PDCCH_reg_BundleSize = 3;
|
||||
PDCCH_interleaverSize = 3;
|
||||
PDCCH_shiftIndex = 10;
|
||||
PDCCH_precoderGranularity = "sameAsREG-bundle";
|
||||
PDCCH_TCI_StateId = 32;
|
||||
tci_PresentInDCI = "ENABLE";
|
||||
PDCCH_DMRS_ScramblingID = 0;
|
||||
SearchSpaceId = 10;
|
||||
commonSearchSpaces_controlResourceSetId = 5;
|
||||
SearchSpace_monitoringSlotPeriodicityAndOffset_choice = "sl1";
|
||||
SearchSpace_monitoringSlotPeriodicityAndOffset_value = 0;
|
||||
SearchSpace_duration = 2;
|
||||
SearchSpace_nrofCandidates_aggregationLevel1 = 0;
|
||||
SearchSpace_nrofCandidates_aggregationLevel2 = 0;
|
||||
SearchSpace_nrofCandidates_aggregationLevel4 = 0;
|
||||
SearchSpace_nrofCandidates_aggregationLevel8 = 0;
|
||||
SearchSpace_nrofCandidates_aggregationLevel16 = 0;
|
||||
SearchSpace_searchSpaceType = "common";
|
||||
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1 = 1;
|
||||
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2 = 1;
|
||||
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4 = 1;
|
||||
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8 = 1;
|
||||
Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16 = 1;
|
||||
Common_dci_Format2_3_monitoringPeriodicity = 1;
|
||||
Common_dci_Format2_3_nrofPDCCH_Candidates = 1;
|
||||
ue_Specific__dci_Formats = "formats0-0-And-1-0";
|
||||
RateMatchPatternLTE_CRS_carrierFreqDL = 6;
|
||||
RateMatchPatternLTE_CRS_carrierBandwidthDL = 6;
|
||||
RateMatchPatternLTE_CRS_nrofCRS_Ports = 1;
|
||||
RateMatchPatternLTE_CRS_v_Shift = 0;
|
||||
RateMatchPatternLTE_CRS_radioframeAllocationPeriod = 1;
|
||||
RateMatchPatternLTE_CRS_radioframeAllocationOffset = 0;
|
||||
RateMatchPatternLTE_CRS_subframeAllocation_choice = "oneFrame";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
GNB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
GNB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
GNB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 0
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 114;
|
||||
eNB_instances = [0];
|
||||
sdr_addrs = "type=b200";
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_DISABLE";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_CONTROLLER :
|
||||
{
|
||||
FLEXRAN_ENABLED = "no";
|
||||
FLEXRAN_INTERFACE_NAME = "lo";
|
||||
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
|
||||
FLEXRAN_PORT = 2210;
|
||||
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
|
||||
FLEXRAN_AWAIT_RECONF = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
@@ -254,7 +254,7 @@ RUs = (
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 114;
|
||||
eNB_instances = [0];
|
||||
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.100.8,clock_source=external,time_source=external";
|
||||
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.10.2,clock_source=external,time_source=external";
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@@ -254,7 +254,7 @@ RUs = (
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 114;
|
||||
eNB_instances = [0];
|
||||
sdr_addrs = "addr=192.168.30.2";
|
||||
sdr_addrs = "type=x300";
|
||||
|
||||
}
|
||||
);
|
||||
@@ -262,7 +262,7 @@ RUs = (
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_DISABLE";
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ RUs = (
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 114;
|
||||
eNB_instances = [0];
|
||||
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.100.8";
|
||||
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2";
|
||||
clock_src = "external";
|
||||
}
|
||||
);
|
||||
|
||||
@@ -254,7 +254,7 @@ RUs = (
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 114;
|
||||
eNB_instances = [0];
|
||||
sdr_addrs = "addr=192.168.30.2";
|
||||
sdr_addrs = "type=x300";
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user