Merge remote-tracking branch 'origin/develop' into mu_with_tdd1
The monolithic eNodeB is not fully functional in FDD. The TDD mode has not been tested. Do not consider this commit as functional. Conflicts: cmake_targets/CMakeLists.txt cmake_targets/build_oai common/utils/itti/intertask_interface.c openair1/PHY/INIT/lte_init.c openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c openair1/PHY/LTE_TRANSPORT/dci_tools.c openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c openair1/PHY/LTE_TRANSPORT/transport_eNB.h openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h openair1/PHY/defs_eNB.h openair1/PHY/impl_defs_lte.h openair1/SCHED/fapi_l1.c openair1/SCHED/phy_procedures_lte_eNb.c openair1/SCHED/pusch_pc.c openair2/COMMON/platform_types.h openair2/COMMON/rrc_messages_types.h openair2/ENB_APP/enb_config.c openair2/ENB_APP/enb_paramdef.h openair2/LAYER2/MAC/config.c openair2/LAYER2/MAC/eNB_scheduler.c openair2/LAYER2/MAC/eNB_scheduler_RA.c openair2/LAYER2/MAC/eNB_scheduler_dlsch.c openair2/LAYER2/MAC/eNB_scheduler_primitives.c openair2/LAYER2/MAC/eNB_scheduler_ulsch.c openair2/LAYER2/MAC/flexran_agent_scheduler_dlsch_ue.c openair2/LAYER2/MAC/mac.h openair2/LAYER2/MAC/mac_proto.h openair2/LAYER2/MAC/pre_processor.c openair2/LAYER2/RLC/rlc.c openair2/LAYER2/RLC/rlc_rrc.c openair2/RRC/LITE/rrc_common.c openair2/RRC/LTE/L2_interface.c openair2/RRC/LTE/MESSAGES/asn1_msg.c openair2/RRC/LTE/rrc_eNB.c openair2/UTIL/LOG/log.h targets/COMMON/openairinterface5g_limits.h targets/RT/USER/lte-enb.c targets/RT/USER/lte-ru.c targets/RT/USER/lte-softmodem.c targets/RT/USER/lte-softmodem.h
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "common_lib.h"
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
|
||||
int set_device(openair0_device *device) {
|
||||
|
||||
@@ -85,52 +86,26 @@ int set_transport(openair0_device *device) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
typedef int(*devfunc_t)(openair0_device *, openair0_config_t *, eth_params_t *);
|
||||
/* 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) {
|
||||
|
||||
void *lib_handle;
|
||||
oai_device_initfunc_t dp ;
|
||||
oai_transport_initfunc_t tp ;
|
||||
loader_shlibfunc_t shlib_fdesc[1];
|
||||
int ret=0;
|
||||
|
||||
char *libname;
|
||||
if (flag == RAU_LOCAL_RADIO_HEAD) {
|
||||
lib_handle = dlopen(OAI_RF_LIBNAME, RTLD_LAZY);
|
||||
if (!lib_handle) {
|
||||
fprintf(stderr,"Unable to locate %s: HW device set to NONE_DEV.\n", OAI_RF_LIBNAME);
|
||||
fprintf(stderr,"%s\n",dlerror());
|
||||
return -1;
|
||||
}
|
||||
|
||||
dp = dlsym(lib_handle,"device_init");
|
||||
|
||||
if (dp != NULL ) {
|
||||
ret = dp(device,openair0_cfg);
|
||||
if (ret<0) {
|
||||
fprintf(stderr, "%s %d:oai device intialization failed %s\n", __FILE__, __LINE__, dlerror());
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "%s %d:oai device intializing function not found %s\n", __FILE__, __LINE__, dlerror());
|
||||
return -1;
|
||||
}
|
||||
libname=OAI_RF_LIBNAME;
|
||||
shlib_fdesc[0].fname="device_init";
|
||||
} else {
|
||||
lib_handle = dlopen(OAI_TP_LIBNAME, RTLD_LAZY);
|
||||
if (!lib_handle) {
|
||||
printf( "Unable to locate %s: transport protocol set to NONE_TP.\n", OAI_TP_LIBNAME);
|
||||
printf( "%s\n",dlerror());
|
||||
return -1;
|
||||
}
|
||||
|
||||
tp = dlsym(lib_handle,"transport_init");
|
||||
|
||||
if (tp != NULL ) {
|
||||
tp(device,openair0_cfg,cfg);
|
||||
} else {
|
||||
fprintf(stderr, "%s %d:oai device intializing function not found %s\n", __FILE__, __LINE__, dlerror());
|
||||
return -1;
|
||||
}
|
||||
libname=OAI_TP_LIBNAME;
|
||||
shlib_fdesc[0].fname="transport_init";
|
||||
}
|
||||
|
||||
ret=load_module_shlib(libname,shlib_fdesc,1);
|
||||
if (ret < 0) {
|
||||
fprintf(stderr,"Library %s couldn't be loaded\n",libname);
|
||||
} else {
|
||||
ret=((devfunc_t)shlib_fdesc[0].fptr)(device,openair0_cfg,cfg);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -142,7 +117,7 @@ int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cf
|
||||
rc=load_lib(device, openair0_cfg, NULL,RAU_LOCAL_RADIO_HEAD );
|
||||
|
||||
if ( rc >= 0) {
|
||||
if ( set_device(device) < 0) {
|
||||
if ( set_device(device) < 0) {
|
||||
fprintf(stderr, "%s %d:Unsupported radio head\n",__FILE__, __LINE__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
/* name of shared library implementing the radio front end */
|
||||
#define OAI_RF_LIBNAME "liboai_device.so"
|
||||
#define OAI_RF_LIBNAME "oai_device"
|
||||
/* name of shared library implementing the transport */
|
||||
#define OAI_TP_LIBNAME "liboai_transpro.so"
|
||||
#define OAI_TP_LIBNAME "oai_transpro"
|
||||
|
||||
/* flags for BBU to determine whether the attached radio head is local or remote */
|
||||
#define RAU_LOCAL_RADIO_HEAD 0
|
||||
|
||||
@@ -987,15 +987,20 @@ extern "C" {
|
||||
// workaround for an api problem, master clock has to be set with the constructor not via set_master_clock_rate
|
||||
args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock);
|
||||
|
||||
// args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=4096, recv_frame_size=4096";
|
||||
|
||||
// args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=4096, recv_frame_size=4096";
|
||||
uhd::device_addrs_t device_adds = uhd::device::find(args);
|
||||
|
||||
if(device_adds.size() == 0) {
|
||||
std::cerr<<"No USRP Device Found. " << std::endl;
|
||||
free(s);
|
||||
return -1;
|
||||
args += ",addr=192.168.30.2";
|
||||
|
||||
uhd::device_addrs_t device_adds = uhd::device::find(args);
|
||||
|
||||
if(device_adds.size() == 0) {
|
||||
|
||||
std::cerr<<"No USRP Device Found. " << std::endl;
|
||||
free(s);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
LOG_I(PHY,"Found USRP X300\n");
|
||||
s->usrp = uhd::usrp::multi_usrp::make(args);
|
||||
@@ -1021,6 +1026,20 @@ extern "C" {
|
||||
LOG_I(PHY,"%s() sample_rate:%u\n", __FUNCTION__, (int)openair0_cfg[0].sample_rate);
|
||||
|
||||
switch ((int)openair0_cfg[0].sample_rate) {
|
||||
case 122880000:
|
||||
// from usrp_time_offset
|
||||
//openair0_cfg[0].samples_per_packet = 2048;
|
||||
openair0_cfg[0].tx_sample_advance = 15; //to be checked
|
||||
openair0_cfg[0].tx_bw = 80e6;
|
||||
openair0_cfg[0].rx_bw = 80e6;
|
||||
break;
|
||||
case 61440000:
|
||||
// from usrp_time_offset
|
||||
//openair0_cfg[0].samples_per_packet = 2048;
|
||||
openair0_cfg[0].tx_sample_advance = 15;
|
||||
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;
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
The driver tcp_bridge_oai.c is to be used with the basic simulator.
|
||||
|
||||
To build the basic simulator:
|
||||
cd [openair top directory]
|
||||
. oaienv
|
||||
cd cmake_targets
|
||||
./build_oai --basic-simulator
|
||||
cd ../common/utils/T/tracer
|
||||
make
|
||||
|
||||
To use it, you need to run the eNB and the UE.
|
||||
|
||||
The eNB requires the T tracer.
|
||||
Open two terminals.
|
||||
In one terminal, run:
|
||||
cd [openair top directory]
|
||||
cd common/utils/T/tracer
|
||||
./enb -d ../T_messages.txt
|
||||
In the other terminal, run:
|
||||
cd [openair top directory]
|
||||
cd cmake_targets/basic_simulator/enb
|
||||
export ENODEB=1
|
||||
sudo -E ./lte-softmodem -O [configuration file]
|
||||
[configuration file] is just a regular configuration file.
|
||||
The eNB needs an EPC.
|
||||
|
||||
To run the UE, open a terminal and run:
|
||||
cd [openair top directory]
|
||||
cd cmake_targets/basic_simulator/ue
|
||||
sudo ./lte-uesoftmodem -C 2680000000 -r 25
|
||||
Adapt the value of -r, it has to match the value N_RB_DL in the configuration
|
||||
file of the eNB. (Same for -C which should match the value downlink_frequency
|
||||
in the configuration file.)
|
||||
|
||||
The UE configuration (security keys) is generated from the file
|
||||
openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf. You need to configure
|
||||
your EPC to know about the UE. If you change the file
|
||||
openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf then you need to
|
||||
regenerate the configuration files using the program targets/bin/conf2uedata.
|
||||
You run it as:
|
||||
$OPENAIR_DIR/targets/bin/conf2uedata -c $OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -o $OPENAIR_DIR/cmake_targets/basic_simulator/ue
|
||||
@@ -0,0 +1,320 @@
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
int fullread(int fd, void *_buf, int count)
|
||||
{
|
||||
char *buf = _buf;
|
||||
int ret = 0;
|
||||
int l;
|
||||
while (count) {
|
||||
l = read(fd, buf, count);
|
||||
if (l <= 0) return -1;
|
||||
count -= l;
|
||||
buf += l;
|
||||
ret += l;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int fullwrite(int fd, void *_buf, int count)
|
||||
{
|
||||
char *buf = _buf;
|
||||
int ret = 0;
|
||||
int l;
|
||||
while (count) {
|
||||
l = write(fd, buf, count);
|
||||
if (l <= 0) return -1;
|
||||
count -= l;
|
||||
buf += l;
|
||||
ret += l;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#include "common_lib.h"
|
||||
|
||||
typedef struct {
|
||||
int sock;
|
||||
int samples_per_subframe;
|
||||
uint64_t timestamp;
|
||||
int is_enb;
|
||||
} tcp_bridge_state_t;
|
||||
|
||||
void verify_connection(int fd, int is_enb)
|
||||
{
|
||||
char c = is_enb;
|
||||
if (fullwrite(fd, &c, 1) != 1) exit(1);
|
||||
if (fullread(fd, &c, 1) != 1) exit(1);
|
||||
if (c == is_enb) {
|
||||
printf("\x1b[31mtcp_bridge: error: you have to run one UE and one eNB"
|
||||
" (did you run 'export ENODEB=1' in the eNB terminal?)\x1b[m\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
int tcp_bridge_start(openair0_device *device)
|
||||
{
|
||||
int port = 4043;
|
||||
tcp_bridge_state_t *tcp_bridge = device->priv;
|
||||
int try;
|
||||
int max_try = 5;
|
||||
|
||||
int sock = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (sock == -1) { perror("tcp_bridge: socket"); exit(1); }
|
||||
|
||||
int enable = 1;
|
||||
if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(int)))
|
||||
{ perror("tcp_bridge: SO_REUSEADDR"); exit(1); }
|
||||
|
||||
struct sockaddr_in addr = {
|
||||
sin_family: AF_INET,
|
||||
sin_port: htons(port),
|
||||
sin_addr: { s_addr: INADDR_ANY }
|
||||
};
|
||||
|
||||
if (bind(sock, (struct sockaddr *)&addr, sizeof(addr))) {
|
||||
if (errno == EADDRINUSE) goto client_mode;
|
||||
{ perror("tcp_bridge: bind"); exit(1); }
|
||||
}
|
||||
|
||||
if (listen(sock, 5))
|
||||
{ perror("tcp_bridge: listen"); exit(1); }
|
||||
|
||||
printf("tcp_bridge: wait for connection on port %d\n", port);
|
||||
|
||||
socklen_t len = sizeof(addr);
|
||||
int sock2 = accept(sock, (struct sockaddr *)&addr, &len);
|
||||
if (sock2 == -1)
|
||||
{ perror("tcp_bridge: accept"); exit(1); }
|
||||
|
||||
close(sock);
|
||||
|
||||
tcp_bridge->sock = sock2;
|
||||
|
||||
printf("tcp_bridge: connection established\n");
|
||||
|
||||
verify_connection(sock2, tcp_bridge->is_enb);
|
||||
|
||||
return 0;
|
||||
|
||||
client_mode:
|
||||
addr.sin_addr.s_addr = inet_addr("127.0.0.1");
|
||||
|
||||
for (try = 0; try < max_try; try++) {
|
||||
if (try != 0) sleep(1);
|
||||
|
||||
printf("tcp_bridge: trying to connect to 127.0.0.1:%d (attempt %d/%d)\n",
|
||||
port, try+1, max_try);
|
||||
|
||||
if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == 0) {
|
||||
printf("tcp_bridge: connection established\n");
|
||||
tcp_bridge->sock = sock;
|
||||
verify_connection(sock, tcp_bridge->is_enb);
|
||||
return 0;
|
||||
}
|
||||
|
||||
perror("tcp_bridge");
|
||||
}
|
||||
|
||||
printf("tcp_bridge: connection failed\n");
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int tcp_bridge_request(openair0_device *device, void *msg, ssize_t msg_len) { abort(); return 0; }
|
||||
int tcp_bridge_reply(openair0_device *device, void *msg, ssize_t msg_len) { abort(); return 0; }
|
||||
int tcp_bridge_get_stats(openair0_device* device) { return 0; }
|
||||
int tcp_bridge_reset_stats(openair0_device* device) { return 0; }
|
||||
void tcp_bridge_end(openair0_device *device) {}
|
||||
int tcp_bridge_stop(openair0_device *device) { return 0; }
|
||||
int tcp_bridge_set_freq(openair0_device* device, openair0_config_t *openair0_cfg,int exmimo_dump_config) { return 0; }
|
||||
int tcp_bridge_set_gains(openair0_device* device, openair0_config_t *openair0_cfg) { return 0; }
|
||||
|
||||
int tcp_bridge_write(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags)
|
||||
{
|
||||
if (cc != 1) { printf("tcp_bridge: only 1 antenna supported\n"); exit(1); }
|
||||
tcp_bridge_state_t *t = device->priv;
|
||||
int n = fullwrite(t->sock, buff[0], nsamps * 4);
|
||||
if (n != nsamps * 4) {
|
||||
printf("tcp_bridge: write error ret %d (wanted %d) error %s\n", n, nsamps*4, strerror(errno));
|
||||
abort();
|
||||
}
|
||||
return nsamps;
|
||||
}
|
||||
|
||||
int tcp_bridge_read(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc)
|
||||
{
|
||||
if (cc != 1) { printf("tcp_bridge: only 1 antenna supported\n"); exit(1); }
|
||||
tcp_bridge_state_t *t = device->priv;
|
||||
int n = fullread(t->sock, buff[0], nsamps * 4);
|
||||
if (n != nsamps * 4) {
|
||||
printf("tcp_bridge: read error ret %d nsamps*4 %d error %s\n", n, nsamps * 4, strerror(errno));
|
||||
abort();
|
||||
}
|
||||
*timestamp = t->timestamp;
|
||||
t->timestamp += nsamps;
|
||||
return nsamps;
|
||||
}
|
||||
|
||||
int tcp_bridge_read_ue(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc)
|
||||
{
|
||||
if (cc != 1) { printf("tcp_bridge: only 1 antenna supported\n"); exit(1); }
|
||||
tcp_bridge_state_t *t = device->priv;
|
||||
int n;
|
||||
|
||||
/* In synch mode, UE does not write, but we need to
|
||||
* send something to the eNodeB.
|
||||
* We know that UE is in synch mode when it reads
|
||||
* 10 subframes at a time.
|
||||
*/
|
||||
if (nsamps == t->samples_per_subframe * 10) {
|
||||
uint32_t b[nsamps];
|
||||
memset(b, 0, nsamps * 4);
|
||||
n = fullwrite(t->sock, b, nsamps * 4);
|
||||
if (n != nsamps * 4) {
|
||||
printf("tcp_bridge: write error ret %d error %s\n", n, strerror(errno));
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
return tcp_bridge_read(device, timestamp, buff, nsamps, cc);
|
||||
}
|
||||
|
||||
/* To startup proper communcation between eNB and UE,
|
||||
* we need to understand that:
|
||||
* - eNodeB starts reading subframe 0
|
||||
* - then eNodeB starts sending subframe 4
|
||||
* and then repeats read/write for each subframe.
|
||||
* The UE:
|
||||
* - reads 10 subframes at a time until it is synchronized
|
||||
* - then reads subframe n and writes subframe n+2
|
||||
* We also want to enforce that the subframe 0 is read
|
||||
* at the beginning of the UE RX buffer, not in the middle
|
||||
* of it.
|
||||
* So it means:
|
||||
* - for the eNodeB: let it run as in normal mode (as with a B210)
|
||||
* - for the UE, on its very first read:
|
||||
* - we want this read to get data from subframe 0
|
||||
* but the first write of eNodeB is subframe 4
|
||||
* so we first need to read and ignore 6 subframes
|
||||
* - the UE will start its TX only at the subframe 2
|
||||
* corresponding to the subframe 0 it just read,
|
||||
* so we need to write 12 subframes before anything
|
||||
* (the function tcp_bridge_read_ue takes care to
|
||||
* insert dummy TX data during the synch phase)
|
||||
*
|
||||
* Here is a drawing of the beginning of things to make
|
||||
* this logic clearer.
|
||||
*
|
||||
* We see that eNB starts RX at subframe 0, starts TX at subfram 4,
|
||||
* and that UE starts RX at subframe 10 and TX at subframe 12.
|
||||
*
|
||||
* We understand that the UE has to transmit 12 empty
|
||||
* subframes for the eNodeB to start its processing.
|
||||
*
|
||||
* And because the eNodeB starts its TX at subframe 4 and we
|
||||
* want the UE to start its RX at subframe 10, we need to
|
||||
* read and ignore 6 subframes in the UE.
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
* eNB RX: | *0* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 ...
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
* eNB TX: | 0 | 1 | 2 | 3 | *4* | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 ...
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
* UE RX: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | *10* | 11 | 12 | 13 | 14 ...
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
* UE TX: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | *12* | 13 | 14 ...
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* As a final note, we do TX before RX to ensure that the eNB will
|
||||
* get some data and send us something so there is no deadlock
|
||||
* at the beginning of things. Hopefully the kernel buffers for
|
||||
* the sockets are big enough so that the first (big) TX can
|
||||
* return to user mode before the buffers are full. If this
|
||||
* is wrong in some environment, we will need to work by smaller
|
||||
* units of data at a time.
|
||||
*/
|
||||
int tcp_bridge_ue_first_read(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc)
|
||||
{
|
||||
if (cc != 1) { printf("tcp_bridge: only 1 antenna supported\n"); exit(1); }
|
||||
tcp_bridge_state_t *t = device->priv;
|
||||
|
||||
uint32_t b[t->samples_per_subframe * 12];
|
||||
memset(b, 0, nsamps * 4);
|
||||
int n = fullwrite(t->sock, b, t->samples_per_subframe * 12 * 4);
|
||||
if (n != t->samples_per_subframe * 12 * 4) {
|
||||
printf("tcp_bridge: write error ret %d error %s\n", n, strerror(errno));
|
||||
abort();
|
||||
}
|
||||
n = fullread(t->sock, b, t->samples_per_subframe * 6 * 4);
|
||||
if (n != t->samples_per_subframe * 6 * 4) {
|
||||
printf("tcp_bridge: read error ret %d error %s\n", n, strerror(errno));
|
||||
abort();
|
||||
}
|
||||
|
||||
device->trx_read_func = tcp_bridge_read_ue;
|
||||
|
||||
return tcp_bridge_read_ue(device, timestamp, buff, nsamps, cc);
|
||||
}
|
||||
|
||||
__attribute__((__visibility__("default")))
|
||||
int device_init(openair0_device* device, openair0_config_t *openair0_cfg)
|
||||
{
|
||||
tcp_bridge_state_t *tcp_bridge = (tcp_bridge_state_t*)malloc(sizeof(tcp_bridge_state_t));
|
||||
memset(tcp_bridge, 0, sizeof(tcp_bridge_state_t));
|
||||
|
||||
tcp_bridge->is_enb = getenv("ENODEB") != NULL;
|
||||
|
||||
printf("tcp_bridge: running as %s\n", tcp_bridge->is_enb ? "eNB" : "UE");
|
||||
|
||||
/* only 25, 50 or 100 PRBs handled for the moment */
|
||||
if (openair0_cfg[0].sample_rate != 30720000 &&
|
||||
openair0_cfg[0].sample_rate != 15360000 &&
|
||||
openair0_cfg[0].sample_rate != 7680000) {
|
||||
printf("tcp_bridge: ERROR: only 25, 50 or 100 PRBs supported\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
device->trx_start_func = tcp_bridge_start;
|
||||
device->trx_get_stats_func = tcp_bridge_get_stats;
|
||||
device->trx_reset_stats_func = tcp_bridge_reset_stats;
|
||||
device->trx_end_func = tcp_bridge_end;
|
||||
device->trx_stop_func = tcp_bridge_stop;
|
||||
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;
|
||||
|
||||
if (tcp_bridge->is_enb) {
|
||||
device->trx_read_func = tcp_bridge_read;
|
||||
} else {
|
||||
device->trx_read_func = tcp_bridge_ue_first_read;
|
||||
}
|
||||
|
||||
device->priv = tcp_bridge;
|
||||
|
||||
switch ((int)openair0_cfg[0].sample_rate) {
|
||||
case 30720000: tcp_bridge->samples_per_subframe = 30720; break;
|
||||
case 15360000: tcp_bridge->samples_per_subframe = 15360; break;
|
||||
case 7680000: tcp_bridge->samples_per_subframe = 7680; break;
|
||||
}
|
||||
|
||||
/* let's pretend to be a b2x0 */
|
||||
device->type = USRP_B200_DEV;
|
||||
|
||||
device->openair0_cfg=&openair0_cfg[0];
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -36,13 +36,15 @@
|
||||
# include "lteRALue.h"
|
||||
# include "lteRALenb.h"
|
||||
# endif
|
||||
# include "RRC/LITE/defs.h"
|
||||
# include "RRC/LTE/rrc_defs.h"
|
||||
# endif
|
||||
# include "enb_app.h"
|
||||
|
||||
int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
|
||||
extern int emulate_rf;
|
||||
|
||||
int create_tasks(uint32_t enb_nb)
|
||||
{
|
||||
LOG_D(ENB_APP, "%s(enb_nb:%d ue_nb:%d)\n", __FUNCTION__, enb_nb, ue_nb);
|
||||
LOG_D(ENB_APP, "%s(enb_nb:%d\n", __FUNCTION__, enb_nb);
|
||||
|
||||
itti_wait_ready(1);
|
||||
if (itti_create_task (TASK_L2L1, l2l1_task, NULL) < 0) {
|
||||
@@ -58,11 +60,7 @@ int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ifdef OPENAIR2
|
||||
{
|
||||
# if defined(ENABLE_USE_MME)
|
||||
{
|
||||
if (enb_nb > 0) {
|
||||
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
|
||||
LOG_E(SCTP, "Create task for SCTP failed\n");
|
||||
@@ -73,10 +71,11 @@ int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
|
||||
LOG_E(S1AP, "Create task for S1AP failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (itti_create_task (TASK_UDP, udp_eNB_task, NULL) < 0) {
|
||||
LOG_E(UDP_, "Create task for UDP failed\n");
|
||||
return -1;
|
||||
if(!emulate_rf){
|
||||
if (itti_create_task (TASK_UDP, udp_eNB_task, NULL) < 0) {
|
||||
LOG_E(UDP_, "Create task for UDP failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (itti_create_task (TASK_GTPV1_U, >pv1u_eNB_task, NULL) < 0) {
|
||||
@@ -85,19 +84,7 @@ int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
|
||||
}
|
||||
}
|
||||
|
||||
# if defined(NAS_BUILT_IN_UE)
|
||||
if (ue_nb > 0) {
|
||||
nas_user_container_t *users = calloc(1, sizeof(*users));
|
||||
if (users == NULL) abort();
|
||||
users->count = ue_nb;
|
||||
if (itti_create_task (TASK_NAS_UE, nas_ue_task, users) < 0) {
|
||||
LOG_E(NAS, "Create task for NAS UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
# endif
|
||||
}
|
||||
# endif
|
||||
|
||||
if (enb_nb > 0) {
|
||||
LOG_I(RRC,"Creating RRC eNB Task\n");
|
||||
@@ -106,27 +93,8 @@ int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
|
||||
LOG_E(RRC, "Create task for RRC eNB failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (ue_nb > 0) {
|
||||
if (itti_create_task (TASK_RRC_UE, rrc_ue_task, NULL) < 0) {
|
||||
LOG_E(RRC, "Create task for RRC UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
# if ENABLE_RAL
|
||||
|
||||
if (itti_create_task (TASK_RAL_UE, mRAL_task, NULL) < 0) {
|
||||
LOG_E(RAL_UE, "Create task for RAL UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
# endif
|
||||
}
|
||||
}
|
||||
# endif // openair2: NN: should be openair3
|
||||
|
||||
|
||||
itti_wait_ready(0);
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
/* External declaration of L2L1 task that depend on the target */
|
||||
extern void *l2l1_task(void *arg);
|
||||
|
||||
int create_tasks(uint32_t enb_nb, uint32_t ue_nb);
|
||||
int create_tasks(uint32_t enb_nb);
|
||||
int create_tasks_ue(uint32_t ue_nb);
|
||||
#endif
|
||||
|
||||
#endif /* CREATE_TASKS_H_ */
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
# include "create_tasks.h"
|
||||
# include "log.h"
|
||||
|
||||
# ifdef OPENAIR2
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# include "sctp_eNB_task.h"
|
||||
# include "s1ap_eNB.h"
|
||||
# include "nas_ue_task.h"
|
||||
# include "udp_eNB_task.h"
|
||||
# include "gtpv1u_eNB_task.h"
|
||||
# endif
|
||||
# if ENABLE_RAL
|
||||
# include "lteRALue.h"
|
||||
# include "lteRALenb.h"
|
||||
# endif
|
||||
# include "RRC/LTE/rrc_defs.h"
|
||||
# endif
|
||||
# include "enb_app.h"
|
||||
|
||||
int create_tasks_ue(uint32_t ue_nb)
|
||||
{
|
||||
LOG_D(ENB_APP, "%s(ue_nb:%d)\n", __FUNCTION__, ue_nb);
|
||||
|
||||
itti_wait_ready(1);
|
||||
if (itti_create_task (TASK_L2L1, l2l1_task, NULL) < 0) {
|
||||
LOG_E(PDCP, "Create task for L2L1 failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# if defined(NAS_BUILT_IN_UE)
|
||||
if (ue_nb > 0) {
|
||||
nas_user_container_t *users = calloc(1, sizeof(*users));
|
||||
if (users == NULL) abort();
|
||||
users->count = ue_nb;
|
||||
if (itti_create_task (TASK_NAS_UE, nas_ue_task, users) < 0) {
|
||||
LOG_E(NAS, "Create task for NAS UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
if (ue_nb > 0) {
|
||||
if (itti_create_task (TASK_RRC_UE, rrc_ue_task, NULL) < 0) {
|
||||
LOG_E(RRC, "Create task for RRC UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
itti_wait_ready(0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -4,24 +4,23 @@
|
||||
#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_LMSSDR)
|
||||
# define NUMBER_OF_eNB_MAX 1
|
||||
# define NUMBER_OF_RU_MAX 2
|
||||
#ifndef UE_EXPANSION
|
||||
# define NUMBER_OF_UE_MAX 16
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 3
|
||||
#else
|
||||
# define NUMBER_OF_UE_MAX 256
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 1
|
||||
#endif
|
||||
# ifndef UE_EXPANSION
|
||||
# define NUMBER_OF_UE_MAX 16
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 3
|
||||
# else
|
||||
# define NUMBER_OF_UE_MAX 256
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 1
|
||||
# endif
|
||||
#else
|
||||
# define NUMBER_OF_eNB_MAX 7
|
||||
# define NUMBER_OF_RU_MAX 32
|
||||
#ifndef UE_EXPANSION
|
||||
# define NUMBER_OF_UE_MAX 20
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 3
|
||||
#else
|
||||
# define NUMBER_OF_UE_MAX 256
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 1
|
||||
#endif
|
||||
|
||||
# ifndef UE_EXPANSION
|
||||
# define NUMBER_OF_UE_MAX 20
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 3
|
||||
# else
|
||||
# define NUMBER_OF_UE_MAX 256
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 1
|
||||
# endif
|
||||
# if defined(STANDALONE) && STANDALONE==1
|
||||
# undef NUMBER_OF_eNB_MAX
|
||||
# undef NUMBER_OF_UE_MAX
|
||||
@@ -30,7 +29,6 @@
|
||||
# define NUMBER_OF_UE_MAX 3
|
||||
# define NUMBER_OF_RU_MAX 3
|
||||
# endif
|
||||
|
||||
# if defined(LARGE_SCALE) && LARGE_SCALE
|
||||
# undef NUMBER_OF_eNB_MAX
|
||||
# undef NUMBER_OF_UE_MAX
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
#Build instructions
|
||||
source oaienv
|
||||
cd cmake_targets
|
||||
|
||||
#Create lte-uesoftmodem-nos1 (UE) and lte-softmodem-nos1 (eNB) executables
|
||||
./build_oai --UE --noS1 -x -t ETHERNET
|
||||
|
||||
./build_oai --eNB --noS1 -x -t ETHERNET
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#Execution instuctions (Currently running eNB (VNF) and UE side (PNF) on the same machine using the loopback interface)
|
||||
cd cmake_targets/tools
|
||||
|
||||
# Loading nasmesh
|
||||
source init_nas_nos1
|
||||
|
||||
# Add a new loopback interface address
|
||||
sudo ifconfig lo: 127.0.0.2 netmask 255.0.0.0 up
|
||||
|
||||
cd ..
|
||||
cd lte_noS1_build_oai/build/
|
||||
|
||||
# Run the eNB process on one terminal (VNF)
|
||||
sudo ./lte-softmodem-nos1 -O PATH_OF:rcc.band7.tm1.50PRB.nfapi.conf
|
||||
|
||||
# Run the UE process on the other terminal (PNF) (--L2-emul specifying the operation in nfapi-L2-emulation mode
|
||||
# and it has to be equal to 3, --num_ues specifying the number of UEs)
|
||||
sudo ./lte-uesoftmodem-nos1 -U -O PATH_OF:oaiL1.nfapi.usrpb210.conf --L2-emul 3 --num-ues 5 > debug_log.txt
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
|
||||
mobile_country_code = "208";
|
||||
mobile_network_code = "92";
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "eNodeB_3GPP";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "TDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 38;
|
||||
downlink_frequency = 2600000000L;
|
||||
uplink_frequency_offset = 0;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 100;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 32;
|
||||
rx_gain = 116;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pdsch_referenceSignalPower = -16;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -90;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -108;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
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 :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="debug";
|
||||
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";
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,175 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
|
||||
mobile_country_code = "208";
|
||||
mobile_network_code = "92";
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "eNodeB_3GPP";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "TDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 38;
|
||||
downlink_frequency = 2600000000L;
|
||||
uplink_frequency_offset = 0;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 32;
|
||||
rx_gain = 116;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pdsch_referenceSignalPower = -16;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -90;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -108;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
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 :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="debug";
|
||||
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";
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,209 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "93";
|
||||
|
||||
tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "eNodeB_3GPP";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2685000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 100;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
pbch_repetition = "FALSE";
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pdsch_referenceSignalPower = -27;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
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 :
|
||||
{
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth6";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth6";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_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 = 116;
|
||||
eNB_instances = [0];
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
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 ="medium";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "93";
|
||||
|
||||
tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "3GPP_eNODEB";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2685000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 50;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
pbch_repetition = "FALSE";
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pdsch_referenceSignalPower = -27;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
rxPool_sc_Period = "sf80";
|
||||
rxPool_data_CP_Len = "normal";
|
||||
rxPool_ResourceConfig_prb_Num = 3;
|
||||
rxPool_ResourceConfig_prb_Start = 4;
|
||||
rxPool_ResourceConfig_prb_End = 9;
|
||||
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
rxPool_ResourceConfig_offsetIndicator_choice = 3;
|
||||
rxPool_ResourceConfig_subframeBitmap_present = "prBs16";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "1100110011001100";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 16;
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
/* rxPool_dataHoppingConfig_hoppingParameter = 0;
|
||||
rxPool_dataHoppingConfig_numSubbands = "ns1";
|
||||
rxPool_dataHoppingConfig_rbOffset = 0;
|
||||
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||
*/
|
||||
// Parameters for SIB19
|
||||
discRxPool_cp_Len = "normal"
|
||||
discRxPool_discPeriod = "rf64"
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRepetition = 2;
|
||||
discRxPool_ResourceConfig_prb_Num = 3;
|
||||
discRxPool_ResourceConfig_prb_Start = 4;
|
||||
discRxPool_ResourceConfig_prb_End = 5;
|
||||
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 4;
|
||||
discRxPool_ResourceConfig_subframeBitmap_present = "prBs16";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "1001100110011001";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 16;
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
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 = "127.0.0.3";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24";
|
||||
ENB_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 = 125;
|
||||
eNB_instances = [0];
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -10,7 +10,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -105,6 +105,40 @@ eNBs =
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
rxPool_sc_Period = "sf40";
|
||||
rxPool_data_CP_Len = "normal";
|
||||
rxPool_ResourceConfig_prb_Num = 20;
|
||||
rxPool_ResourceConfig_prb_Start = 5;
|
||||
rxPool_ResourceConfig_prb_End = 44;
|
||||
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
rxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
/* rxPool_dataHoppingConfig_hoppingParameter = 0;
|
||||
rxPool_dataHoppingConfig_numSubbands = "ns1";
|
||||
rxPool_dataHoppingConfig_rbOffset = 0;
|
||||
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||
*/
|
||||
// Parameters for SIB19
|
||||
discRxPool_cp_Len = "normal"
|
||||
discRxPool_discPeriod = "rf32"
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRepetition = 2;
|
||||
discRxPool_ResourceConfig_prb_Num = 5;
|
||||
discRxPool_ResourceConfig_prb_Start = 3;
|
||||
discRxPool_ResourceConfig_prb_End = 21;
|
||||
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@@ -151,9 +185,9 @@ eNBs =
|
||||
{
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.19/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.19/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
}
|
||||
@@ -164,6 +198,7 @@ MACRLCs = (
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
phy_test_mode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -189,6 +224,16 @@ RUs = (
|
||||
}
|
||||
);
|
||||
|
||||
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";
|
||||
|
||||
@@ -4,28 +4,47 @@ log_config = {
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="low";
|
||||
mac_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="debug";
|
||||
mac_log_verbosity ="medium";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
rrc_log_level ="debug";
|
||||
rrc_log_verbosity ="full";
|
||||
};
|
||||
|
||||
|
||||
#L1s = (
|
||||
# {
|
||||
# num_cc = 1;
|
||||
# tr_n_preference = "nfapi";
|
||||
# local_n_if_name = "eno1";
|
||||
# remote_n_address = "192.168.1.28";
|
||||
# local_n_address = "192.168.1.74";
|
||||
# local_n_portc = 50000;
|
||||
# remote_n_portc = 50001;
|
||||
# local_n_portd = 50010;
|
||||
# remote_n_portd = 50011;
|
||||
# }
|
||||
#);
|
||||
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "nfapi";
|
||||
local_n_if_name = "lo";
|
||||
#local_n_if_name = "enp0s31f6";
|
||||
#remote_n_address = "10.0.0.2";
|
||||
#local_n_address = "10.0.0.1";
|
||||
local_n_if_name = "lo";
|
||||
remote_n_address = "127.0.0.2";
|
||||
local_n_address = "127.0.0.1";
|
||||
local_n_portc = 50000;
|
||||
remote_n_portc = 50001;
|
||||
local_n_portd = 50010;
|
||||
remote_n_portd = 50011;
|
||||
local_n_address = "127.0.0.1";
|
||||
local_n_portc = 50000;
|
||||
remote_n_portc = 50001;
|
||||
local_n_portd = 50010;
|
||||
remote_n_portd = 50011;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -34,11 +53,10 @@ RUs = (
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 0
|
||||
att_tx = 90
|
||||
att_rx = 0;
|
||||
bands = [7,38,42,43];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 125;
|
||||
eNB_instances = [0];
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
#mobile_network_code = "93";
|
||||
mobile_network_code = "92";
|
||||
|
||||
tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "3GPP_eNODEB";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2685000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
#N_RB_DL = 50;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 115;
|
||||
pbch_repetition = "FALSE";
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
#pdsch_referenceSignalPower = -27;
|
||||
pdsch_referenceSignalPower = -30;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
#rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleInitialReceivedTargetPower = -104;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
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.56.102";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "vboxnet0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.56.1/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "vboxnet0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.56.1/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
local_s_if_name = "eno1";
|
||||
remote_s_address = "10.0.0.2";
|
||||
#local_s_address = "192.168.1.78";
|
||||
local_s_address = "10.0.0.1";
|
||||
local_s_portc = 50001;
|
||||
remote_s_portc = 50000;
|
||||
local_s_portd = 50011;
|
||||
remote_s_portd = 50010;
|
||||
tr_s_preference = "nfapi";
|
||||
tr_n_preference = "local_RRC";
|
||||
}
|
||||
);
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="debug";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="debug";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="debug";
|
||||
rlc_log_verbosity ="high";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="high";
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -10,7 +10,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -105,6 +105,40 @@ eNBs =
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
rxPool_sc_Period = "sf40";
|
||||
rxPool_data_CP_Len = "normal";
|
||||
rxPool_ResourceConfig_prb_Num = 20;
|
||||
rxPool_ResourceConfig_prb_Start = 5;
|
||||
rxPool_ResourceConfig_prb_End = 44;
|
||||
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
rxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
/* rxPool_dataHoppingConfig_hoppingParameter = 0;
|
||||
rxPool_dataHoppingConfig_numSubbands = "ns1";
|
||||
rxPool_dataHoppingConfig_rbOffset = 0;
|
||||
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||
*/
|
||||
// Parameters for SIB19
|
||||
discRxPool_cp_Len = "normal"
|
||||
discRxPool_discPeriod = "rf32"
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRepetition = 2;
|
||||
discRxPool_ResourceConfig_prb_Num = 5;
|
||||
discRxPool_ResourceConfig_prb_Start = 3;
|
||||
discRxPool_ResourceConfig_prb_End = 21;
|
||||
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -13,7 +13,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -13,7 +13,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -73,8 +73,7 @@ eNBs =
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_p0_Nominal = -104;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
@@ -197,13 +196,13 @@ RUs = (
|
||||
);
|
||||
|
||||
log_config = {
|
||||
global_log_level ="debug";
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="debug";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="debug";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
|
||||
@@ -11,7 +11,7 @@ RUs = (
|
||||
tr_preference = "udp_if4p5";
|
||||
nb_tx = 1;
|
||||
nb_rx = 1;
|
||||
max_pdschReferenceSignalPower = -29;
|
||||
max_pdschReferenceSignalPower = -15;
|
||||
max_rxgain = 120;
|
||||
bands = [7,13];
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
[*]
|
||||
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
|
||||
[*] Tue Jul 25 20:26:12 2017
|
||||
[*] Thu Feb 22 14:46:40 2018
|
||||
[*]
|
||||
[dumpfile] "/tmp/openair_dump_eNB.vcd"
|
||||
[dumpfile_mtime] "Tue Jul 25 20:11:55 2017"
|
||||
[dumpfile_size] 19201475
|
||||
[savefile] "/home/papillon/openairinterface5g/targets/RT/USER/eNB_usrp.gtkw"
|
||||
[timestart] 29023604000
|
||||
[size] 1236 578
|
||||
[pos] 309 0
|
||||
*-20.793451 29026062100 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
|
||||
[dumpfile_mtime] "Thu Feb 22 14:44:26 2018"
|
||||
[dumpfile_size] 3482761
|
||||
[savefile] "/homes/wangts/openairinterface5g/targets/RT/USER/eNB_usrp.gtkw"
|
||||
[timestart] 4525000000
|
||||
[size] 1920 1018
|
||||
[pos] 0 22
|
||||
*-21.506693 4530514310 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
|
||||
[sst_width] 386
|
||||
[signals_width] 262
|
||||
[signals_width] 344
|
||||
[sst_expanded] 1
|
||||
[sst_vpaned_height] 146
|
||||
[sst_vpaned_height] 303
|
||||
@28
|
||||
functions.trx_read
|
||||
functions.trx_write
|
||||
@@ -25,12 +25,42 @@ functions.eNB_thread_rxtx0
|
||||
@24
|
||||
variables.frame_number_RX0_RU[63:0]
|
||||
variables.subframe_number_RX0_RU[63:0]
|
||||
@25
|
||||
variables.frame_number_TX0_RU[63:0]
|
||||
@24
|
||||
variables.subframe_number_TX0_RU[63:0]
|
||||
@28
|
||||
functions.mac_schedule_dlsch
|
||||
functions.macxface_eNB_dlsch_ulsch_scheduler
|
||||
functions.macxface_ue_scheduler
|
||||
functions.phy_eNB_ofdm_mod_l
|
||||
@24
|
||||
variables.frame_number_RX0_eNB[63:0]
|
||||
@25
|
||||
variables.subframe_number_RX0_eNB[63:0]
|
||||
@24
|
||||
variables.frame_number_TX0_eNB[63:0]
|
||||
variables.subframe_number_TX0_eNB[63:0]
|
||||
variables.frame_number_RX1_eNB[63:0]
|
||||
variables.subframe_number_RX1_eNB[63:0]
|
||||
variables.frame_number_TX1_eNB[63:0]
|
||||
variables.subframe_number_TX1_eNB[63:0]
|
||||
@28
|
||||
functions.phy_eNB_dlsch_modulation
|
||||
functions.phy_eNB_dlsch_encoding
|
||||
functions.phy_eNB_dlsch_scrambling
|
||||
functions.phy_eNB_beam_precoding
|
||||
functions.phy_enb_pdcch_tx
|
||||
functions.phy_enb_prach_rx
|
||||
functions.phy_procedures_ru_feprx0
|
||||
functions.phy_procedures_eNb_rx_uespec0
|
||||
functions.phy_procedures_eNb_rx_uespec1
|
||||
functions.phy_enb_sfgen
|
||||
functions.phy_procedures_eNb_tx0
|
||||
functions.phy_procedures_eNb_tx1
|
||||
functions.phy_procedures_ru_feprx1
|
||||
functions.phy_procedures_ru_feptx_ofdm0
|
||||
functions.phy_procedures_ru_feptx_ofdm1
|
||||
functions.phy_procedures_ru_feptx_prec0
|
||||
functions.phy_procedures_ru_feptx_prec1
|
||||
functions.eNB_thread_rxtx1
|
||||
functions.phy_enb_sfgen
|
||||
functions.phy_enb_prach_rx
|
||||
|
||||
+378
-89
@@ -44,7 +44,12 @@
|
||||
|
||||
#include "PHY/types.h"
|
||||
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "SCHED/sched_eNB.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_proto.h"
|
||||
|
||||
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
|
||||
@@ -55,22 +60,14 @@
|
||||
#include "PHY/LTE_TRANSPORT/if4_tools.h"
|
||||
#include "PHY/LTE_TRANSPORT/if5_tools.h"
|
||||
|
||||
#include "PHY/extern.h"
|
||||
#include "SCHED/extern.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
|
||||
#include "../../SIMU/USER/init_lte.h"
|
||||
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#include "LAYER2/MAC/proto.h"
|
||||
#include "RRC/LITE/extern.h"
|
||||
#include "PHY_INTERFACE/extern.h"
|
||||
#include "PHY_INTERFACE/defs.h"
|
||||
#ifdef SMBV
|
||||
#include "PHY/TOOLS/smbv.h"
|
||||
unsigned short config_frames[4] = {2,9,11,13};
|
||||
#endif
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "PHY_INTERFACE/phy_interface.h"
|
||||
#include "UTIL/LOG/log_extern.h"
|
||||
#include "UTIL/OTG/otg_tx.h"
|
||||
#include "UTIL/OTG/otg_externs.h"
|
||||
@@ -78,7 +75,7 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "enb_config.h"
|
||||
//#include "PHY/TOOLS/time_meas.h"
|
||||
|
||||
|
||||
#ifndef OPENAIR2
|
||||
#include "UTIL/OTG/otg_extern.h"
|
||||
@@ -95,7 +92,6 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
|
||||
#include "T.h"
|
||||
|
||||
|
||||
//#define DEBUG_THREADS 1
|
||||
|
||||
//#define USRP_DEBUG 1
|
||||
@@ -122,7 +118,9 @@ extern int transmission_mode;
|
||||
|
||||
extern int oaisim_flag;
|
||||
|
||||
uint16_t sf_ahead=4;
|
||||
//uint16_t sf_ahead=4;
|
||||
extern uint16_t sf_ahead;
|
||||
|
||||
|
||||
//pthread_t main_eNB_thread;
|
||||
|
||||
@@ -149,11 +147,13 @@ void exit_fun(const char* s);
|
||||
void init_eNB(int,int);
|
||||
void stop_eNB(int nb_inst);
|
||||
|
||||
|
||||
int wakeup_tx(PHY_VARS_eNB *eNB,RU_proc_t *ru_proc);
|
||||
int wakeup_txfh(eNB_rxtx_proc_t *proc,RU_proc_t *ru_proc);
|
||||
void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe);
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe);
|
||||
#endif
|
||||
extern int codingw;
|
||||
|
||||
extern uint8_t nfapi_mode;
|
||||
extern void oai_subframe_ind(uint16_t sfn, uint16_t sf);
|
||||
@@ -212,7 +212,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
||||
// if this is IF5 or 3GPP_eNB
|
||||
if (eNB && eNB->RU_list && eNB->RU_list[0] && eNB->RU_list[0]->function < NGFI_RAU_IF4p5) {
|
||||
wakeup_prach_eNB(eNB,NULL,proc->frame_rx,proc->subframe_rx);
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
wakeup_prach_eNB_br(eNB,NULL,proc->frame_rx,proc->subframe_rx);
|
||||
#endif
|
||||
}
|
||||
@@ -221,7 +221,16 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
||||
|
||||
// UE-specific RX processing for subframe n
|
||||
if (nfapi_mode == 0 || nfapi_mode == 1) {
|
||||
phy_procedures_eNB_uespec_RX(eNB, proc, no_relay );
|
||||
phy_procedures_eNB_uespec_RX(eNB, proc);
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 1 );
|
||||
|
||||
if(get_nprocs() >= 8){
|
||||
if(wait_on_condition(&proc[1].mutex_rxtx,&proc[1].cond_rxtx,&proc[1].pipe_ready,"wakeup_tx")<0) {
|
||||
LOG_E(PHY,"Frame %d, subframe %d: TX1 not ready\n",proc[1].frame_rx,proc[1].subframe_rx);
|
||||
return(-1);
|
||||
}
|
||||
if (release_thread(&proc[1].mutex_rxtx,&proc[1].pipe_ready,"wakeup_tx")<0) return(-1);
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&eNB->UL_INFO_mutex);
|
||||
@@ -234,6 +243,9 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
||||
eNB->if_inst->UL_indication(&eNB->UL_INFO);
|
||||
|
||||
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
|
||||
#if 0
|
||||
/* TODO: find a correct solution for this conflict */
|
||||
<<<<<<< HEAD
|
||||
|
||||
// *****************************************
|
||||
// TX processing for subframe n+sf_ahead
|
||||
@@ -247,6 +259,27 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
||||
phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1);
|
||||
#endif
|
||||
if (release_thread(&proc->mutex_rxtx,&proc->instance_cnt_rxtx,thread_name)<0) return(-1);
|
||||
=======
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 0 );
|
||||
if(oai_exit) return(-1);
|
||||
if(get_nprocs() <= 4){
|
||||
phy_procedures_eNB_TX(eNB, proc, 1);
|
||||
}
|
||||
>>>>>>> origin/develop
|
||||
#endif /* #if 0 */
|
||||
/* this conflict resolution may be totally wrong, to be tested */
|
||||
/* CONFLICT RESOLUTION: BEGIN */
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER , 0 );
|
||||
if(oai_exit) return(-1);
|
||||
if(get_nprocs() <= 4){
|
||||
#ifndef PHY_TX_THREAD
|
||||
phy_procedures_eNB_TX(eNB, proc, 1);
|
||||
#endif
|
||||
}
|
||||
/* CONFLICT RESOLUTION: what about this release_thread call, has it to be done? if yes, where? */
|
||||
//if (release_thread(&proc->mutex_rxtx,&proc->instance_cnt_rxtx,thread_name)<0) return(-1);
|
||||
/* CONFLICT RESOLUTION: END */
|
||||
|
||||
stop_meas( &softmodem_stats_rxtx_sf );
|
||||
|
||||
@@ -298,6 +331,50 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
||||
}
|
||||
|
||||
|
||||
static void* tx_thread(void* param) {
|
||||
|
||||
eNB_proc_t *eNB_proc = (eNB_proc_t*)param;
|
||||
eNB_rxtx_proc_t *proc = &eNB_proc->proc_rxtx[1];
|
||||
PHY_VARS_eNB *eNB = RC.eNB[0][proc->CC_id];
|
||||
|
||||
char thread_name[100];
|
||||
sprintf(thread_name,"TXnp4_%d\n",&eNB->proc.proc_rxtx[0] == proc ? 0 : 1);
|
||||
thread_top_init(thread_name,1,470000,500000,500000);
|
||||
|
||||
//wait_sync("tx_thread");
|
||||
|
||||
while (!oai_exit) {
|
||||
|
||||
|
||||
if (wait_on_condition(&proc->mutex_rxtx,&proc->cond_rxtx,&proc->instance_cnt_rxtx,thread_name)<0) break;
|
||||
if (oai_exit) break;
|
||||
// *****************************************
|
||||
// TX processing for subframe n+4
|
||||
// run PHY TX procedures the one after the other for all CCs to avoid race conditions
|
||||
// (may be relaxed in the future for performance reasons)
|
||||
// *****************************************
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX1_ENB,proc->subframe_tx);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX1_ENB,proc->subframe_rx);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_ENB,proc->frame_tx);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_ENB,proc->frame_rx);
|
||||
|
||||
phy_procedures_eNB_TX(eNB, proc, 1);
|
||||
if (release_thread(&proc->mutex_rxtx,&proc->instance_cnt_rxtx,thread_name)<0) break;
|
||||
|
||||
pthread_mutex_lock( &proc->mutex_rxtx );
|
||||
proc->pipe_ready++;
|
||||
// the thread can now be woken up
|
||||
if (pthread_cond_signal(&proc->cond_rxtx) != 0) {
|
||||
LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread\n");
|
||||
exit_fun( "ERROR pthread_cond_signal" );
|
||||
}
|
||||
pthread_mutex_unlock( &proc->mutex_rxtx );
|
||||
wakeup_txfh(proc,eNB_proc->ru_proc);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief The RX UE-specific and TX thread of eNB.
|
||||
* \param param is a \ref eNB_proc_t structure which contains the info what to process.
|
||||
@@ -307,42 +384,83 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
||||
static void* eNB_thread_rxtx( void* param ) {
|
||||
|
||||
static int eNB_thread_rxtx_status;
|
||||
//eNB_proc_t *eNB_proc = (eNB_proc_t*)param;
|
||||
eNB_rxtx_proc_t *proc;
|
||||
|
||||
// Working
|
||||
if(nfapi_mode ==2){
|
||||
proc = (eNB_rxtx_proc_t*)param;
|
||||
}
|
||||
else{
|
||||
eNB_proc_t *eNB_proc = (eNB_proc_t*)param;
|
||||
proc = &eNB_proc->proc_rxtx[0];
|
||||
}
|
||||
|
||||
|
||||
eNB_rxtx_proc_t *proc = (eNB_rxtx_proc_t*)param;
|
||||
PHY_VARS_eNB *eNB = RC.eNB[0][proc->CC_id];
|
||||
//RU_proc_t *ru_proc = NULL;
|
||||
|
||||
char thread_name[100];
|
||||
|
||||
cpu_set_t cpuset;
|
||||
CPU_ZERO(&cpuset);
|
||||
|
||||
// set default return value
|
||||
eNB_thread_rxtx_status = 0;
|
||||
|
||||
|
||||
sprintf(thread_name,"RXn_TXnp4_%d",&eNB->proc.proc_rxtx[0] == proc ? 0 : 1);
|
||||
thread_top_init(thread_name,1,850000L,1000000L,2000000L);
|
||||
sprintf(thread_name,"RXn_TXnp4_%d\n",&eNB->proc.proc_rxtx[0] == proc ? 0 : 1);
|
||||
thread_top_init(thread_name,1,470000,500000,500000);
|
||||
pthread_setname_np( pthread_self(),"rxtx processing");
|
||||
LOG_I(PHY,"thread rxtx created id=%ld\n", syscall(__NR_gettid));
|
||||
|
||||
|
||||
|
||||
while (!oai_exit) {
|
||||
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0+(proc->subframe_rx&1), 0 );
|
||||
T(T_ENB_MASTER_TICK, T_INT(0), T_INT(proc->frame_rx), T_INT(proc->subframe_rx));
|
||||
|
||||
if (wait_on_condition(&proc->mutex_rxtx,&proc->cond_rxtx,&proc->instance_cnt_rxtx,thread_name)<0) break;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_CPUID_ENB_THREAD_RXTX,sched_getcpu());
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0+(proc->subframe_rx&1), 1 );
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_ENB,proc->subframe_tx);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_ENB,proc->subframe_rx);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB,proc->frame_tx);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_ENB,proc->frame_rx);
|
||||
|
||||
|
||||
if (oai_exit) break;
|
||||
|
||||
if (eNB->CC_id==0)
|
||||
{
|
||||
if (rxtx(eNB,proc,thread_name) < 0) break;
|
||||
|
||||
}
|
||||
|
||||
if (release_thread(&proc->mutex_rxtx,&proc->instance_cnt_rxtx,thread_name)<0) break;
|
||||
pthread_mutex_lock( &proc->mutex_rxtx );
|
||||
proc->pipe_ready++;
|
||||
// the thread can now be woken up
|
||||
if (pthread_cond_signal(&proc->cond_rxtx) != 0) {
|
||||
LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread\n");
|
||||
exit_fun( "ERROR pthread_cond_signal" );
|
||||
}
|
||||
pthread_mutex_unlock( &proc->mutex_rxtx );
|
||||
if(get_nprocs() >= 8) wakeup_tx(eNB,eNB->proc.ru_proc);
|
||||
else
|
||||
{
|
||||
phy_procedures_eNB_TX(eNB, proc, 1);
|
||||
wakeup_txfh(proc,eNB->proc.ru_proc);
|
||||
}
|
||||
|
||||
} // while !oai_exit
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0+(proc->subframe_rx&1), 0 );
|
||||
|
||||
printf( "Exiting eNB thread RXn_TXnp4\n");
|
||||
LOG_D(PHY, " *** Exiting eNB thread RXn_TXnp4\n");
|
||||
|
||||
eNB_thread_rxtx_status = 0;
|
||||
return &eNB_thread_rxtx_status;
|
||||
@@ -372,10 +490,12 @@ static void wait_system_ready (char *message, volatile int *start_flag) {
|
||||
|
||||
|
||||
|
||||
void eNB_top(PHY_VARS_eNB *eNB, int frame_rx, int subframe_rx, char *string)
|
||||
void eNB_top(PHY_VARS_eNB *eNB, int frame_rx, int subframe_rx, char *string,RU_t *ru)
|
||||
{
|
||||
eNB_proc_t *proc = &eNB->proc;
|
||||
eNB_rxtx_proc_t *proc_rxtx = &proc->proc_rxtx[0];
|
||||
LTE_DL_FRAME_PARMS *fp = &ru->frame_parms;
|
||||
RU_proc_t *ru_proc=&ru->proc;
|
||||
|
||||
proc->frame_rx = frame_rx;
|
||||
proc->subframe_rx = subframe_rx;
|
||||
@@ -383,23 +503,115 @@ void eNB_top(PHY_VARS_eNB *eNB, int frame_rx, int subframe_rx, char *string)
|
||||
if (!oai_exit) {
|
||||
T(T_ENB_MASTER_TICK, T_INT(0), T_INT(proc->frame_rx), T_INT(proc->subframe_rx));
|
||||
|
||||
proc_rxtx->subframe_rx = proc->subframe_rx;
|
||||
proc_rxtx->frame_rx = proc->frame_rx;
|
||||
proc_rxtx->subframe_tx = (proc->subframe_rx+sf_ahead)%10;
|
||||
proc_rxtx->frame_tx = (proc->subframe_rx>(9-sf_ahead)) ? (1+proc->frame_rx)&1023 : proc->frame_rx;
|
||||
proc->frame_tx = proc_rxtx->frame_tx;
|
||||
proc_rxtx->timestamp_tx = proc->timestamp_tx;
|
||||
proc_rxtx->timestamp_tx = ru_proc->timestamp_rx + (sf_ahead*fp->samples_per_tti);
|
||||
proc_rxtx->frame_rx = ru_proc->frame_rx;
|
||||
proc_rxtx->subframe_rx = ru_proc->subframe_rx;
|
||||
proc_rxtx->frame_tx = (proc_rxtx->subframe_rx > (9-sf_ahead)) ? (proc_rxtx->frame_rx+1)&1023 : proc_rxtx->frame_rx;
|
||||
proc_rxtx->subframe_tx = (proc_rxtx->subframe_rx + sf_ahead)%10;
|
||||
|
||||
if (rxtx(eNB,proc_rxtx,string) < 0) LOG_E(PHY,"eNB %d CC_id %d failed during execution\n",eNB->Mod_id,eNB->CC_id);
|
||||
ru_proc->timestamp_tx = proc_rxtx->timestamp_tx;
|
||||
ru_proc->subframe_tx = proc_rxtx->subframe_tx;
|
||||
ru_proc->frame_tx = proc_rxtx->frame_tx;
|
||||
}
|
||||
}
|
||||
|
||||
int wakeup_txfh(eNB_rxtx_proc_t *proc,RU_proc_t *ru_proc) {
|
||||
|
||||
if(ru_proc == NULL)
|
||||
return(0);
|
||||
struct timespec wait;
|
||||
wait.tv_sec=0;
|
||||
wait.tv_nsec=5000000L;
|
||||
|
||||
|
||||
if(wait_on_condition(&ru_proc->mutex_eNBs,&ru_proc->cond_eNBs,&ru_proc->ru_tx_ready,"wakeup_txfh")<0) {
|
||||
LOG_E(PHY,"Frame %d, subframe %d: TX FH not ready\n", ru_proc->frame_tx, ru_proc->subframe_tx);
|
||||
return(-1);
|
||||
}
|
||||
if (release_thread(&ru_proc->mutex_eNBs,&ru_proc->ru_tx_ready,"wakeup_txfh")<0) return(-1);
|
||||
|
||||
if (ru_proc->instance_cnt_eNBs == 0) {
|
||||
LOG_E(PHY,"Frame %d, subframe %d: TX FH thread busy, dropping Frame %d, subframe %d\n", ru_proc->frame_tx, ru_proc->subframe_tx, proc->frame_rx, proc->subframe_rx);
|
||||
return(-1);
|
||||
}
|
||||
if (pthread_mutex_timedlock(&ru_proc->mutex_eNBs,&wait) != 0) {
|
||||
LOG_E( PHY, "[eNB] ERROR pthread_mutex_lock for eNB TX1 thread %d (IC %d)\n", ru_proc->subframe_rx&1,ru_proc->instance_cnt_eNBs );
|
||||
exit_fun( "error locking mutex_eNB" );
|
||||
return(-1);
|
||||
}
|
||||
|
||||
++ru_proc->instance_cnt_eNBs;
|
||||
ru_proc->timestamp_tx = proc->timestamp_tx;
|
||||
ru_proc->subframe_tx = proc->subframe_tx;
|
||||
ru_proc->frame_tx = proc->frame_tx;
|
||||
|
||||
// the thread can now be woken up
|
||||
if (pthread_cond_signal(&ru_proc->cond_eNBs) != 0) {
|
||||
LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread\n");
|
||||
exit_fun( "ERROR pthread_cond_signal" );
|
||||
return(-1);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock( &ru_proc->mutex_eNBs );
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
int wakeup_tx(PHY_VARS_eNB *eNB,RU_proc_t *ru_proc) {
|
||||
|
||||
eNB_proc_t *proc=&eNB->proc;
|
||||
|
||||
eNB_rxtx_proc_t *proc_rxtx1=&proc->proc_rxtx[1];//*proc_rxtx=&proc->proc_rxtx[proc->frame_rx&1];
|
||||
eNB_rxtx_proc_t *proc_rxtx0=&proc->proc_rxtx[0];
|
||||
|
||||
|
||||
struct timespec wait;
|
||||
wait.tv_sec=0;
|
||||
wait.tv_nsec=5000000L;
|
||||
|
||||
|
||||
|
||||
if (proc_rxtx1->instance_cnt_rxtx == 0) {
|
||||
LOG_E(PHY,"Frame %d, subframe %d: TX1 thread busy, dropping\n",proc_rxtx1->frame_rx,proc_rxtx1->subframe_rx);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if (pthread_mutex_timedlock(&proc_rxtx1->mutex_rxtx,&wait) != 0) {
|
||||
LOG_E( PHY, "[eNB] ERROR pthread_mutex_lock for eNB TX1 thread %d (IC %d)\n", proc_rxtx1->subframe_rx&1,proc_rxtx1->instance_cnt_rxtx );
|
||||
exit_fun( "error locking mutex_tx" );
|
||||
return(-1);
|
||||
}
|
||||
|
||||
++proc_rxtx1->instance_cnt_rxtx;
|
||||
|
||||
|
||||
proc_rxtx1->subframe_rx = proc_rxtx0->subframe_rx;
|
||||
proc_rxtx1->frame_rx = proc_rxtx0->frame_rx;
|
||||
proc_rxtx1->subframe_tx = proc_rxtx0->subframe_tx;
|
||||
proc_rxtx1->frame_tx = proc_rxtx0->frame_tx;
|
||||
proc_rxtx1->timestamp_tx = proc_rxtx0->timestamp_tx;
|
||||
|
||||
// the thread can now be woken up
|
||||
if (pthread_cond_signal(&proc_rxtx1->cond_rxtx) != 0) {
|
||||
LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB TXnp4 thread\n");
|
||||
exit_fun( "ERROR pthread_cond_signal" );
|
||||
return(-1);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock( &proc_rxtx1->mutex_rxtx );
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
|
||||
|
||||
eNB_proc_t *proc=&eNB->proc;
|
||||
RU_proc_t *ru_proc=&ru->proc;
|
||||
|
||||
eNB_rxtx_proc_t *proc_rxtx=&proc->proc_rxtx[proc->frame_rx&1];
|
||||
eNB_rxtx_proc_t *proc_rxtx0=&proc->proc_rxtx[0];//*proc_rxtx=&proc->proc_rxtx[proc->frame_rx&1];
|
||||
//eNB_rxtx_proc_t *proc_rxtx1=&proc->proc_rxtx[1];
|
||||
|
||||
|
||||
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
|
||||
|
||||
@@ -431,25 +643,28 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
|
||||
wait.tv_sec=0;
|
||||
wait.tv_nsec=5000000L;
|
||||
|
||||
/* accept some delay in processing - up to 5ms */
|
||||
for (i = 0; i < 10 && proc_rxtx->instance_cnt_rxtx == 0; i++) {
|
||||
LOG_W( PHY,"[eNB] Frame %d Subframe %d, eNB RXn-TXnp4 thread busy!! (cnt_rxtx %i)\n", proc_rxtx->frame_tx, proc_rxtx->subframe_tx, proc_rxtx->instance_cnt_rxtx);
|
||||
usleep(500);
|
||||
|
||||
if(wait_on_condition(&proc_rxtx0->mutex_rxtx,&proc_rxtx0->cond_rxtx,&proc_rxtx0->pipe_ready,"wakeup_rxtx")<0) {
|
||||
LOG_E(PHY,"Frame %d, subframe %d: RXTX0 not ready\n",proc_rxtx0->frame_rx,proc_rxtx0->subframe_rx);
|
||||
return(-1);
|
||||
}
|
||||
if (proc_rxtx->instance_cnt_rxtx == 0) {
|
||||
exit_fun( "TX thread busy" );
|
||||
if (release_thread(&proc_rxtx0->mutex_rxtx,&proc_rxtx0->pipe_ready,"wakeup_rxtx")<0) return(-1);
|
||||
|
||||
if (proc_rxtx0->instance_cnt_rxtx == 0) {
|
||||
LOG_E(PHY,"Frame %d, subframe %d: RXTX0 thread busy, dropping\n",proc_rxtx0->frame_rx,proc_rxtx0->subframe_rx);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
// wake up TX for subframe n+sf_ahead
|
||||
// lock the TX mutex and make sure the thread is ready
|
||||
if (pthread_mutex_timedlock(&proc_rxtx->mutex_rxtx,&wait) != 0) {
|
||||
LOG_E( PHY, "[eNB] ERROR pthread_mutex_lock for eNB RXTX thread %d (IC %d)\n", proc_rxtx->subframe_rx&1,proc_rxtx->instance_cnt_rxtx );
|
||||
if (pthread_mutex_timedlock(&proc_rxtx0->mutex_rxtx,&wait) != 0) {
|
||||
LOG_E( PHY, "[eNB] ERROR pthread_mutex_lock for eNB RXTX thread %d (IC %d)\n", proc_rxtx0->subframe_rx&1,proc_rxtx0->instance_cnt_rxtx );
|
||||
exit_fun( "error locking mutex_rxtx" );
|
||||
return(-1);
|
||||
}
|
||||
|
||||
++proc_rxtx->instance_cnt_rxtx;
|
||||
|
||||
++proc_rxtx0->instance_cnt_rxtx;
|
||||
|
||||
// We have just received and processed the common part of a subframe, say n.
|
||||
// TS_rx is the last received timestamp (start of 1st slot), TS_tx is the desired
|
||||
@@ -457,20 +672,20 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
|
||||
// The last (TS_rx mod samples_per_frame) was n*samples_per_tti,
|
||||
// we want to generate subframe (n+sf_ahead), so TS_tx = TX_rx+sf_ahead*samples_per_tti,
|
||||
// and proc->subframe_tx = proc->subframe_rx+sf_ahead
|
||||
proc_rxtx->timestamp_tx = proc->timestamp_rx + (sf_ahead*fp->samples_per_tti);
|
||||
proc_rxtx->frame_rx = proc->frame_rx;
|
||||
proc_rxtx->subframe_rx = proc->subframe_rx;
|
||||
proc_rxtx->frame_tx = (proc_rxtx->subframe_rx > (9-sf_ahead)) ? (proc_rxtx->frame_rx+1)&1023 : proc_rxtx->frame_rx;
|
||||
proc_rxtx->subframe_tx = (proc_rxtx->subframe_rx + sf_ahead)%10;
|
||||
proc_rxtx0->timestamp_tx = ru_proc->timestamp_rx + (sf_ahead*fp->samples_per_tti);
|
||||
proc_rxtx0->frame_rx = ru_proc->frame_rx;
|
||||
proc_rxtx0->subframe_rx = ru_proc->subframe_rx;
|
||||
proc_rxtx0->frame_tx = (proc_rxtx0->subframe_rx > (9-sf_ahead)) ? (proc_rxtx0->frame_rx+1)&1023 : proc_rxtx0->frame_rx;
|
||||
proc_rxtx0->subframe_tx = (proc_rxtx0->subframe_rx + sf_ahead)%10;
|
||||
|
||||
// the thread can now be woken up
|
||||
if (pthread_cond_signal(&proc_rxtx->cond_rxtx) != 0) {
|
||||
if (pthread_cond_signal(&proc_rxtx0->cond_rxtx) != 0) {
|
||||
LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB RXn-TXnp4 thread\n");
|
||||
exit_fun( "ERROR pthread_cond_signal" );
|
||||
return(-1);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock( &proc_rxtx->mutex_rxtx );
|
||||
pthread_mutex_unlock( &proc_rxtx0->mutex_rxtx );
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -506,7 +721,7 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe) {
|
||||
if (is_prach_subframe(fp,frame,subframe)>0) {
|
||||
LOG_D(PHY,"Triggering prach processing, frame %d, subframe %d\n",frame,subframe);
|
||||
if (proc->instance_cnt_prach == 0) {
|
||||
//LOG_W(PHY,"[eNB] Frame %d Subframe %d, dropping PRACH\n", frame,subframe);
|
||||
LOG_W(PHY,"[eNB] Frame %d Subframe %d, dropping PRACH\n", frame,subframe);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -534,7 +749,7 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe) {
|
||||
|
||||
}
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe) {
|
||||
|
||||
eNB_proc_t *proc = &eNB->proc;
|
||||
@@ -566,7 +781,7 @@ void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe) {
|
||||
if (is_prach_subframe(fp,frame,subframe)>0) {
|
||||
LOG_D(PHY,"Triggering prach br processing, frame %d, subframe %d\n",frame,subframe);
|
||||
if (proc->instance_cnt_prach_br == 0) {
|
||||
//LOG_W(PHY,"[eNB] Frame %d Subframe %d, dropping PRACH BR\n", frame,subframe);
|
||||
LOG_W(PHY,"[eNB] Frame %d Subframe %d, dropping PRACH BR\n", frame,subframe);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -611,8 +826,9 @@ static void* eNB_thread_prach( void* param ) {
|
||||
// set default return value
|
||||
eNB_thread_prach_status = 0;
|
||||
|
||||
thread_top_init("eNB_thread_prach",1,500000L,1000000L,20000000L);
|
||||
thread_top_init("eNB_thread_prach",1,500000,1000000,20000000);
|
||||
|
||||
//wait_sync("eNB_thread_prach");
|
||||
|
||||
while (!oai_exit) {
|
||||
|
||||
@@ -623,7 +839,7 @@ static void* eNB_thread_prach( void* param ) {
|
||||
|
||||
LOG_D(PHY,"Running eNB prach procedures\n");
|
||||
prach_procedures(eNB
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0
|
||||
#endif
|
||||
);
|
||||
@@ -637,7 +853,7 @@ static void* eNB_thread_prach( void* param ) {
|
||||
return &eNB_thread_prach_status;
|
||||
}
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/*!
|
||||
* \brief The prach receive thread of eNB for BL/CE UEs.
|
||||
* \param param is a \ref eNB_proc_t structure which contains the info what to process.
|
||||
@@ -653,7 +869,7 @@ static void* eNB_thread_prach_br( void* param ) {
|
||||
// set default return value
|
||||
eNB_thread_prach_status = 0;
|
||||
|
||||
thread_top_init("eNB_thread_prach_br",1,500000L,1000000L,20000000L);
|
||||
thread_top_init("eNB_thread_prach_br",1,500000,1000000,20000000);
|
||||
|
||||
while (!oai_exit) {
|
||||
|
||||
@@ -677,8 +893,40 @@ static void* eNB_thread_prach_br( void* param ) {
|
||||
#endif
|
||||
|
||||
|
||||
extern void init_td_thread(PHY_VARS_eNB *, pthread_attr_t *);
|
||||
extern void init_te_thread(PHY_VARS_eNB *, pthread_attr_t *);
|
||||
|
||||
extern void init_td_thread(PHY_VARS_eNB *);
|
||||
extern void init_te_thread(PHY_VARS_eNB *);
|
||||
extern void kill_td_thread(PHY_VARS_eNB *);
|
||||
extern void kill_te_thread(PHY_VARS_eNB *);
|
||||
//////////////////////////////////////need to modified////////////////*****
|
||||
|
||||
static void* process_stats_thread(void* param) {
|
||||
|
||||
PHY_VARS_eNB *eNB = (PHY_VARS_eNB*)param;
|
||||
|
||||
wait_sync("process_stats_thread");
|
||||
|
||||
while (!oai_exit) {
|
||||
sleep(1);
|
||||
if (opp_enabled == 1) {
|
||||
if (eNB->td) print_meas(&eNB->ulsch_decoding_stats,"ulsch_decoding",NULL,NULL);
|
||||
if (eNB->te)
|
||||
{
|
||||
print_meas(&eNB->dlsch_turbo_encoding_preperation_stats,"dlsch_coding_crc",NULL,NULL);
|
||||
print_meas(&eNB->dlsch_turbo_encoding_segmentation_stats,"dlsch_segmentation",NULL,NULL);
|
||||
print_meas(&eNB->dlsch_encoding_stats,"dlsch_encoding",NULL,NULL);
|
||||
print_meas(&eNB->dlsch_turbo_encoding_signal_stats,"coding_signal",NULL,NULL);
|
||||
print_meas(&eNB->dlsch_turbo_encoding_main_stats,"coding_main",NULL,NULL);
|
||||
print_meas(&eNB->dlsch_turbo_encoding_waiting_stats,"coding_wait",NULL,NULL);
|
||||
print_meas(&eNB->dlsch_turbo_encoding_wakeup_stats0,"coding_worker_0",NULL,NULL);
|
||||
print_meas(&eNB->dlsch_turbo_encoding_wakeup_stats1,"coding_worker_1",NULL,NULL);
|
||||
}
|
||||
print_meas(&eNB->dlsch_modulation_stats,"dlsch_modulation",NULL,NULL);
|
||||
}
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
|
||||
void init_eNB_proc(int inst) {
|
||||
|
||||
@@ -688,8 +936,7 @@ void init_eNB_proc(int inst) {
|
||||
eNB_proc_t *proc;
|
||||
eNB_rxtx_proc_t *proc_rxtx;
|
||||
pthread_attr_t *attr0=NULL,*attr1=NULL,*attr_prach=NULL;
|
||||
//*attr_td=NULL,*attr_te=NULL;
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
pthread_attr_t *attr_prach_br=NULL;
|
||||
#endif
|
||||
|
||||
@@ -705,8 +952,11 @@ void init_eNB_proc(int inst) {
|
||||
proc_rxtx = proc->proc_rxtx;
|
||||
proc_rxtx[0].instance_cnt_rxtx = -1;
|
||||
proc_rxtx[1].instance_cnt_rxtx = -1;
|
||||
proc_rxtx[0].pipe_ready = 0;
|
||||
proc_rxtx[1].pipe_ready = 0;
|
||||
proc->instance_cnt_prach = -1;
|
||||
proc->instance_cnt_asynch_rxtx = -1;
|
||||
proc->instance_cnt_synch = -1;
|
||||
proc->CC_id = CC_id;
|
||||
|
||||
proc->first_rx=1;
|
||||
@@ -730,11 +980,9 @@ void init_eNB_proc(int inst) {
|
||||
|
||||
pthread_attr_init( &proc->attr_prach);
|
||||
pthread_attr_init( &proc->attr_asynch_rxtx);
|
||||
// pthread_attr_init( &proc->attr_td);
|
||||
// pthread_attr_init( &proc->attr_te);
|
||||
pthread_attr_init( &proc_rxtx[0].attr_rxtx);
|
||||
pthread_attr_init( &proc_rxtx[1].attr_rxtx);
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
proc->instance_cnt_prach_br = -1;
|
||||
proc->RU_mask_prach_br=0;
|
||||
pthread_mutex_init( &proc->mutex_prach_br, NULL);
|
||||
@@ -746,13 +994,31 @@ void init_eNB_proc(int inst) {
|
||||
attr0 = &proc_rxtx[0].attr_rxtx;
|
||||
attr1 = &proc_rxtx[1].attr_rxtx;
|
||||
attr_prach = &proc->attr_prach;
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
attr_prach_br = &proc->attr_prach_br;
|
||||
#endif
|
||||
|
||||
// attr_td = &proc->attr_td;
|
||||
// attr_te = &proc->attr_te;
|
||||
#endif
|
||||
//////////////////////////////////////need to modified////////////////*****
|
||||
if(get_nprocs() > 2 && codingw)
|
||||
{
|
||||
init_te_thread(eNB);
|
||||
init_td_thread(eNB);
|
||||
}
|
||||
//////////////////////////////////////need to modified////////////////*****
|
||||
//pthread_create( &proc_rxtx[0].pthread_rxtx, attr0, eNB_thread_rxtx, proc );
|
||||
|
||||
//pthread_create( &proc_rxtx[0].pthread_rxtx, attr0, eNB_thread_rxtx, proc_rxtx );
|
||||
|
||||
|
||||
// Panos: Should we also include here the case where single_thread_flag = 1 ?
|
||||
if(nfapi_mode!=2){
|
||||
pthread_create( &proc_rxtx[0].pthread_rxtx, attr0, eNB_thread_rxtx, proc );
|
||||
pthread_create( &proc_rxtx[1].pthread_rxtx, attr1, tx_thread, proc);
|
||||
}
|
||||
|
||||
|
||||
LOG_I(PHY,"eNB->single_thread_flag:%d\n", eNB->single_thread_flag);
|
||||
|
||||
@@ -761,7 +1027,7 @@ void init_eNB_proc(int inst) {
|
||||
pthread_create( &proc_rxtx[1].pthread_rxtx, attr1, eNB_thread_rxtx, &proc_rxtx[1] );
|
||||
}
|
||||
pthread_create( &proc->pthread_prach, attr_prach, eNB_thread_prach, eNB );
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
pthread_create( &proc->pthread_prach_br, attr_prach_br, eNB_thread_prach_br, eNB );
|
||||
#endif
|
||||
char name[16];
|
||||
@@ -773,6 +1039,9 @@ void init_eNB_proc(int inst) {
|
||||
}
|
||||
|
||||
AssertFatal(proc->instance_cnt_prach == -1,"instance_cnt_prach = %d\n",proc->instance_cnt_prach);
|
||||
|
||||
|
||||
if (opp_enabled == 1) pthread_create(&proc->process_stats_thread,NULL,process_stats_thread,(void*)eNB);
|
||||
|
||||
|
||||
}
|
||||
@@ -798,6 +1067,8 @@ void init_eNB_proc(int inst) {
|
||||
pthread_mutex_init(&sync_phy_proc.mutex_phy_proc_tx, NULL);
|
||||
pthread_cond_init(&sync_phy_proc.cond_phy_proc_tx, NULL);
|
||||
sync_phy_proc.phy_proc_CC_id = 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -811,49 +1082,50 @@ void kill_eNB_proc(int inst) {
|
||||
PHY_VARS_eNB *eNB;
|
||||
eNB_proc_t *proc;
|
||||
eNB_rxtx_proc_t *proc_rxtx;
|
||||
int i;
|
||||
for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
eNB=RC.eNB[inst][CC_id];
|
||||
|
||||
proc = &eNB->proc;
|
||||
proc_rxtx = &proc->proc_rxtx[0];
|
||||
|
||||
|
||||
kill_td_thread(eNB);
|
||||
kill_te_thread(eNB);
|
||||
LOG_I(PHY, "Killing TX CC_id %d inst %d\n", CC_id, inst );
|
||||
|
||||
if (eNB->single_thread_flag==0) {
|
||||
proc_rxtx[0].instance_cnt_rxtx = 0; // FIXME data race!
|
||||
proc_rxtx[1].instance_cnt_rxtx = 0; // FIXME data race!
|
||||
pthread_cond_signal( &proc_rxtx[0].cond_rxtx );
|
||||
pthread_cond_signal( &proc_rxtx[1].cond_rxtx );
|
||||
for (i=0; i<2; i++) {
|
||||
pthread_mutex_lock(&proc_rxtx[i].mutex_rxtx);
|
||||
proc_rxtx[i].instance_cnt_rxtx = 0;
|
||||
proc_rxtx[i].pipe_ready = 0;
|
||||
pthread_cond_signal(&proc_rxtx[i].cond_rxtx);
|
||||
pthread_mutex_unlock(&proc_rxtx[i].mutex_rxtx);
|
||||
}
|
||||
proc->instance_cnt_prach = 0;
|
||||
pthread_cond_signal( &proc->cond_prach );
|
||||
|
||||
pthread_cond_signal( &proc->cond_asynch_rxtx );
|
||||
pthread_cond_broadcast(&sync_phy_proc.cond_phy_proc_tx);
|
||||
|
||||
LOG_D(PHY, "joining pthread_prach\n");
|
||||
pthread_join( proc->pthread_prach, (void**)&status );
|
||||
|
||||
LOG_I(PHY, "Destroying prach mutex/cond\n");
|
||||
pthread_mutex_destroy( &proc->mutex_prach );
|
||||
pthread_cond_destroy( &proc->cond_prach );
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
proc->instance_cnt_prach_br = 0;
|
||||
pthread_cond_signal( &proc->cond_prach_br );
|
||||
pthread_join( proc->pthread_prach_br, (void**)&status );
|
||||
pthread_mutex_destroy( &proc->mutex_prach_br );
|
||||
pthread_cond_destroy( &proc->cond_prach_br );
|
||||
#endif
|
||||
|
||||
LOG_I(PHY, "Destroying UL_INFO mutex\n");
|
||||
pthread_mutex_destroy(&eNB->UL_INFO_mutex);
|
||||
int i;
|
||||
if (eNB->single_thread_flag==0) {
|
||||
for (i=0;i<2;i++) {
|
||||
LOG_I(PHY, "Joining rxtx[%d] mutex/cond\n",i);
|
||||
pthread_join( proc_rxtx[i].pthread_rxtx, (void**)&status );
|
||||
LOG_I(PHY, "Destroying rxtx[%d] mutex/cond\n",i);
|
||||
pthread_mutex_destroy( &proc_rxtx[i].mutex_rxtx );
|
||||
pthread_cond_destroy( &proc_rxtx[i].cond_rxtx );
|
||||
}
|
||||
for (i=0;i<2;i++) {
|
||||
LOG_I(PHY, "Joining rxtx[%d] mutex/cond\n",i);
|
||||
pthread_join( proc_rxtx[i].pthread_rxtx, (void**)&status );
|
||||
LOG_I(PHY, "Destroying rxtx[%d] mutex/cond\n",i);
|
||||
pthread_mutex_destroy( &proc_rxtx[i].mutex_rxtx );
|
||||
pthread_cond_destroy( &proc_rxtx[i].cond_rxtx );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -886,6 +1158,21 @@ void print_opp_meas(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void free_transport(PHY_VARS_eNB *eNB)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
|
||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
LOG_I(PHY, "Freeing Transport Channel Buffers for DLSCH, UE %d\n",i);
|
||||
for (j=0; j<2; j++) free_eNB_dlsch(eNB->dlsch[i][j]);
|
||||
|
||||
LOG_I(PHY, "Freeing Transport Channel Buffer for ULSCH, UE %d\n",i);
|
||||
free_eNB_ulsch(eNB->ulsch[1+i]);
|
||||
}
|
||||
free_eNB_ulsch(eNB->ulsch[0]);
|
||||
}
|
||||
|
||||
void init_transport(PHY_VARS_eNB *eNB) {
|
||||
|
||||
int i;
|
||||
@@ -974,7 +1261,7 @@ void init_eNB_afterRU(void) {
|
||||
LOG_I(PHY,"Overwriting eNB->prach_vars.rxsigF[0]:%p\n", eNB->prach_vars.rxsigF[0]);
|
||||
|
||||
eNB->prach_vars.rxsigF[0] = (int16_t**)malloc16(64*sizeof(int16_t*));
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
for (int ce_level=0;ce_level<4;ce_level++) {
|
||||
LOG_I(PHY,"Overwriting eNB->prach_vars_br.rxsigF.rxsigF[0]:%p\n", eNB->prach_vars_br.rxsigF[ce_level]);
|
||||
eNB->prach_vars_br.rxsigF[ce_level] = (int16_t**)malloc16(64*sizeof(int16_t*));
|
||||
@@ -997,7 +1284,7 @@ void init_eNB_afterRU(void) {
|
||||
for (i=0;i<eNB->RU_list[ru_id]->nb_rx;aa++,i++) {
|
||||
LOG_I(PHY,"Attaching RU %d antenna %d to eNB antenna %d\n",eNB->RU_list[ru_id]->idx,i,aa);
|
||||
eNB->prach_vars.rxsigF[0][aa] = eNB->RU_list[ru_id]->prach_rxsigF[i];
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
for (int ce_level=0;ce_level<4;ce_level++)
|
||||
eNB->prach_vars_br.rxsigF[ce_level][aa] = eNB->RU_list[ru_id]->prach_rxsigF_br[ce_level][i];
|
||||
#endif
|
||||
@@ -1050,7 +1337,9 @@ void init_eNB_afterRU(void) {
|
||||
|
||||
RC.ru[ru_id]->wakeup_rxtx = wakeup_rxtx;
|
||||
RC.ru[ru_id]->wakeup_prach_eNB = wakeup_prach_eNB;
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
RC.ru[ru_id]->wakeup_prach_eNB_br = wakeup_prach_eNB_br;
|
||||
#endif
|
||||
RC.ru[ru_id]->eNB_top = eNB_top;
|
||||
}
|
||||
}
|
||||
@@ -1080,8 +1369,8 @@ void init_eNB(int single_thread_flag,int wait_for_sync) {
|
||||
#endif
|
||||
|
||||
|
||||
eNB->td = ulsch_decoding_data;//(single_thread_flag==1) ? ulsch_decoding_data_2thread : ulsch_decoding_data;
|
||||
eNB->te = dlsch_encoding;//(single_thread_flag==1) ? dlsch_encoding_2threads : dlsch_encoding;
|
||||
eNB->td = ulsch_decoding_data_all;//(get_nprocs()<=4) ? ulsch_decoding_data : ulsch_decoding_data_2thread;
|
||||
eNB->te = dlsch_encoding_all;//(get_nprocs()<=4) ? dlsch_encoding : dlsch_encoding_2threads;
|
||||
|
||||
|
||||
LOG_I(PHY,"Registering with MAC interface module\n");
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+772
-270
File diff suppressed because it is too large
Load Diff
+253
-406
File diff suppressed because it is too large
Load Diff
@@ -28,9 +28,12 @@
|
||||
#include "assertions.h"
|
||||
#include "msc.h"
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/defs_UE.h"
|
||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||
|
||||
#include "flexran_agent.h"
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
#if defined(ENABLE_USE_MME)
|
||||
#include "s1ap_eNB.h"
|
||||
@@ -72,6 +75,8 @@
|
||||
#define CONFIG_HLP_DLMCS "Set the maximum downlink MCS\n"
|
||||
#define CONFIG_HLP_STMON "Enable processing timing measurement of lte softmodem on per subframe basis \n"
|
||||
#define CONFIG_HLP_PRB "Set the PRB, valid values: 6, 25, 50, 100 \n"
|
||||
#define CONFIG_HLP_EMULIFACE "Set the interface name for the multicast transport for emulation mode (e.g. eth0, lo, etc.) \n"
|
||||
//#define CONFIG_HLP_NUMUES "Set the number of UEs for the emulation"
|
||||
#define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \n"
|
||||
#define CONFIG_HLP_ULMCS "Set the maximum uplink MCS\n"
|
||||
#define CONFIG_HLP_TDD "Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n"
|
||||
@@ -84,6 +89,12 @@
|
||||
#define CONFIG_HLP_NOTWAIT "don't wait for tracer, start immediately\n"
|
||||
#define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n"
|
||||
|
||||
#define CONFIG_HLP_NUMEROLOGY "adding numerology for 5G\n"
|
||||
#define CONFIG_HLP_CODINGW "coding worker thread enable(disable by defult)\n"
|
||||
#define CONFIG_HLP_FEPW "FEP worker thread enabled(disable by defult)\n"
|
||||
#define CONFIG_HLP_EMULATE_RF "Emulated RF enabled(disable by defult)\n"
|
||||
|
||||
#define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n"
|
||||
|
||||
/***************************************************************************************************************************************/
|
||||
/* command line options definitions, CMDLINE_XXXX_DESC macros are used to initialize paramdef_t arrays which are then used as argument
|
||||
@@ -127,46 +138,54 @@
|
||||
{"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, u8ptr:&nb_antenna_tx, defuintval:1, TYPE_UINT8, 0}, \
|
||||
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&UE_scan_carrier, defintval:0, TYPE_INT, 0}, \
|
||||
{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \
|
||||
{"r" , CONFIG_HLP_PRB, 0, u8ptr:&n_rb_dl, defintval:0, TYPE_UINT8, 0}, \
|
||||
{"emul-iface", CONFIG_HLP_EMULIFACE, 0, strptr:&emul_iface, defstrval:"lo", TYPE_STRING, 100}, \
|
||||
{"L2-emul", NULL, 0, u8ptr:&nfapi_mode, defuintval:3, TYPE_UINT8, 0}, \
|
||||
{"num-ues", NULL, 0, u8ptr:&(NB_UE_INST), defuintval:1, TYPE_UINT8, 0}, \
|
||||
{"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT8, 0}, \
|
||||
{"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
||||
}
|
||||
|
||||
#define DEFAULT_DLF 2680000000
|
||||
|
||||
extern int16_t dlsch_demod_shift;
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters common to eNodeB and UE */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define CMDLINE_PARAMS_DESC { \
|
||||
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&rf_config_file, defstrval:NULL, TYPE_STRING, sizeof(rf_config_file)}, \
|
||||
{"ulsch-max-errors", CONFIG_HLP_ULMAXE, 0, uptr:&ULSCH_max_consecutive_errors, defuintval:0, TYPE_UINT, 0}, \
|
||||
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&phy_test, defintval:0, TYPE_INT, 0}, \
|
||||
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&usim_test, defintval:0, TYPE_UINT8, 0}, \
|
||||
{"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, uptr:&mmapped_dma, defintval:0, TYPE_INT, 0}, \
|
||||
{"external-clock", CONFIG_HLP_EXCCLK, PARAMFLAG_BOOL, uptr:&clock_source, defintval:0, TYPE_INT, 0}, \
|
||||
{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&wait_for_sync, defintval:0, TYPE_INT, 0}, \
|
||||
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
|
||||
{"threadIQ", NULL, 0, iptr:&(threads.iq), defintval:1, TYPE_INT, 0}, \
|
||||
{"threadOneSubframe", NULL, 0, iptr:&(threads.one), defintval:1, TYPE_INT, 0}, \
|
||||
{"threadTwoSubframe", NULL, 0, iptr:&(threads.two), defintval:1, TYPE_INT, 0}, \
|
||||
{"threadThreeSubframe", NULL, 0, iptr:&(threads.three), defintval:1, TYPE_INT, 0}, \
|
||||
{"threadSlot1ProcOne", NULL, 0, iptr:&(threads.slot1_proc_one), defintval:1, TYPE_INT, 0}, \
|
||||
{"threadSlot1ProcTwo", NULL, 0, iptr:&(threads.slot1_proc_two), defintval:1, TYPE_INT, 0}, \
|
||||
{"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
||||
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
|
||||
{"C" , CONFIG_HLP_DLF, 0, uptr:&(downlink_frequency[0][0]), defuintval:2680000000, TYPE_UINT, 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}, \
|
||||
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \
|
||||
{"K" , CONFIG_HLP_ITTIL, PARAMFLAG_NOFREE, strptr:&itti_dump_file, defstrval:"/tmp/itti.dump", TYPE_STRING, 0}, \
|
||||
{"U" , CONFIG_HLP_UE, PARAMFLAG_BOOL, i8ptr:&UE_flag, defintval:0, TYPE_INT8, 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}, \
|
||||
{"W" , CONFIG_HLP_L2MONW, 0, strptr:(char **)&in_ip, defstrval:"127.0.0.1", TYPE_STRING, sizeof(in_ip)}, \
|
||||
{"P" , CONFIG_HLP_L2MONP, 0, strptr:(char **)&in_path, defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, sizeof(in_path)}, \
|
||||
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&ouput_vcd, defintval:0, TYPE_INT, 0}, \
|
||||
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
|
||||
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
|
||||
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0} \
|
||||
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&rf_config_file, defstrval:NULL, TYPE_STRING, sizeof(rf_config_file)}, \
|
||||
{"ulsch-max-errors", CONFIG_HLP_ULMAXE, 0, uptr:&ULSCH_max_consecutive_errors, defuintval:0, TYPE_UINT, 0}, \
|
||||
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&phy_test, defintval:0, TYPE_INT, 0}, \
|
||||
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&usim_test, defintval:0, TYPE_UINT8, 0}, \
|
||||
{"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, uptr:&mmapped_dma, defintval:0, TYPE_INT, 0}, \
|
||||
{"external-clock", CONFIG_HLP_EXCCLK, PARAMFLAG_BOOL, uptr:&clock_source, defintval:0, TYPE_INT, 0}, \
|
||||
{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&wait_for_sync, defintval:0, TYPE_INT, 0}, \
|
||||
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
|
||||
{"threadIQ", NULL, 0, iptr:&(threads.iq), defintval:1, TYPE_INT, 0}, \
|
||||
{"threadOneSubframe", NULL, 0, iptr:&(threads.one), defintval:1, TYPE_INT, 0}, \
|
||||
{"threadTwoSubframe", NULL, 0, iptr:&(threads.two), defintval:1, TYPE_INT, 0}, \
|
||||
{"threadThreeSubframe", NULL, 0, iptr:&(threads.three), defintval:1, TYPE_INT, 0}, \
|
||||
{"threadSlot1ProcOne", NULL, 0, iptr:&(threads.slot1_proc_one), defintval:1, TYPE_INT, 0}, \
|
||||
{"threadSlot1ProcTwo", NULL, 0, iptr:&(threads.slot1_proc_two), defintval:1, TYPE_INT, 0}, \
|
||||
{"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
||||
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
|
||||
{"C" , CONFIG_HLP_DLF, 0, uptr:&(downlink_frequency[0][0]), defuintval:2680000000, TYPE_UINT, 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}, \
|
||||
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \
|
||||
{"K" , CONFIG_HLP_ITTIL, PARAMFLAG_NOFREE, strptr:&itti_dump_file, defstrval:"/tmp/itti.dump", TYPE_STRING, 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}, \
|
||||
{"W" , CONFIG_HLP_L2MONW, 0, strptr:(char **)&in_ip, defstrval:"127.0.0.1", TYPE_STRING, sizeof(in_ip)}, \
|
||||
{"P" , CONFIG_HLP_L2MONP, 0, strptr:(char **)&in_path, defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, sizeof(in_path)}, \
|
||||
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&ouput_vcd, defintval:0, TYPE_INT, 0}, \
|
||||
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
|
||||
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
|
||||
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
|
||||
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0}, \
|
||||
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \
|
||||
{"codingw" , CONFIG_HLP_CODINGW, PARAMFLAG_BOOL, iptr:&codingw, defintval:0, TYPE_INT, 0}, \
|
||||
{"fepw" , CONFIG_HLP_FEPW, PARAMFLAG_BOOL, iptr:&fepw, defintval:0, TYPE_INT, 0}, \
|
||||
{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, iptr:&nonbiotflag, defintval:0, TYPE_INT, 0} \
|
||||
}
|
||||
|
||||
#define CONFIG_HLP_FLOG "Enable online log \n"
|
||||
@@ -246,24 +265,33 @@ extern void kill_eNB_proc(int inst);
|
||||
// In lte-ru.c
|
||||
extern void init_RU(const char*);
|
||||
extern void stop_ru(RU_t *ru);
|
||||
extern void init_RU_proc(RU_t *ru);
|
||||
extern void stop_RU(int nb_ru);
|
||||
extern void kill_RU_proc(int inst);
|
||||
extern void set_function_spec_param(RU_t *ru);
|
||||
|
||||
// In lte-ue.c
|
||||
extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
|
||||
extern void fill_ue_band_info(void);
|
||||
|
||||
extern void init_UE(int,int,int);
|
||||
extern void init_UE(int,int,int,int);
|
||||
extern void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_t *cpuset, char * name);
|
||||
|
||||
extern void reset_opp_meas(void);
|
||||
extern void print_opp_meas(void);
|
||||
|
||||
extern void init_fep_thread(PHY_VARS_eNB *, pthread_attr_t *);
|
||||
extern void init_td_thread(PHY_VARS_eNB *, pthread_attr_t *);
|
||||
extern void init_te_thread(PHY_VARS_eNB *, pthread_attr_t *);
|
||||
extern void init_td_thread(PHY_VARS_eNB *);
|
||||
extern void init_te_thread(PHY_VARS_eNB *);
|
||||
extern void kill_td_thread(PHY_VARS_eNB *);
|
||||
extern void kill_te_thread(PHY_VARS_eNB *);
|
||||
|
||||
PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t UE_id,
|
||||
uint8_t abstraction_flag);
|
||||
void init_eNB_afterRU(void);
|
||||
|
||||
extern int stop_L1L2(module_id_t enb_id);
|
||||
extern int restart_L1L2(module_id_t enb_id);
|
||||
|
||||
#endif
|
||||
|
||||
+1830
-543
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -43,8 +43,9 @@
|
||||
#include <getopt.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include "rt_wrapper.h"
|
||||
#include <errno.h>
|
||||
|
||||
#include "openair1/PHY/defs.h"
|
||||
#include "openair1/PHY/defs_common.h"
|
||||
|
||||
static int latency_target_fd = -1;
|
||||
static int32_t latency_target_value = 0;
|
||||
@@ -283,6 +284,7 @@ void thread_top_init(char *thread_name,
|
||||
|
||||
if (sched_setattr(0, &attr, flags) < 0 ) {
|
||||
perror("[SCHED] eNB tx thread: sched_setattr failed\n");
|
||||
fprintf(stderr,"sched_setattr Error = %s",strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,32 +26,24 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "SIMULATION/TOOLS/defs.h"
|
||||
#include "SIMULATION/RF/defs.h"
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "SIMULATION/RF/rf.h"
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/extern.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/phy_extern_ue.h"
|
||||
|
||||
#ifdef OPENAIR2
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log_if.h"
|
||||
#include "UTIL/LOG/log_extern.h"
|
||||
#include "RRC/LITE/extern.h"
|
||||
#include "PHY_INTERFACE/extern.h"
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "PHY_INTERFACE/phy_interface_extern.h"
|
||||
#include "UTIL/OCG/OCG.h"
|
||||
#include "UTIL/OPT/opt.h" // to test OPT
|
||||
#endif
|
||||
|
||||
#include "UTIL/FIFO/types.h"
|
||||
|
||||
#ifdef IFFT_FPGA
|
||||
#include "PHY/LTE_REFSIG/mod_table.h"
|
||||
#endif
|
||||
|
||||
#include "SCHED/defs.h"
|
||||
#include "SCHED/extern.h"
|
||||
|
||||
#ifdef XFORMS
|
||||
#include "forms.h"
|
||||
#include "phy_procedures_sim_form.h"
|
||||
@@ -61,6 +53,10 @@
|
||||
|
||||
#define RF
|
||||
#define DEBUG_SIM
|
||||
/*
|
||||
#undef LOG_D
|
||||
#define LOG_D(A,B,C...) printf(B,C)
|
||||
*/
|
||||
|
||||
int number_rb_ul;
|
||||
int first_rbUL ;
|
||||
@@ -83,8 +79,8 @@ void do_DL_sig(channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM
|
||||
node_desc_t *enb_data[NUMBER_OF_RU_MAX],
|
||||
node_desc_t *ue_data[NUMBER_OF_UE_MAX],
|
||||
uint16_t subframe,
|
||||
uint16_t offset,
|
||||
uint16_t length,
|
||||
uint32_t offset,
|
||||
uint32_t length,
|
||||
uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *ue_frame_parms,
|
||||
uint8_t UE_id,
|
||||
int CC_id)
|
||||
@@ -140,6 +136,7 @@ void do_DL_sig(channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM
|
||||
if (!hold_channel) {
|
||||
// calculate the random channel from each RU
|
||||
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
|
||||
frame_parms = &RC.ru[ru_id]->frame_parms;
|
||||
|
||||
random_channel(RU2UE[ru_id][UE_id][CC_id],abstraction_flag);
|
||||
/*
|
||||
@@ -231,7 +228,6 @@ void do_DL_sig(channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM
|
||||
pthread_mutex_lock(&RU_output_mutex[UE_id]);
|
||||
|
||||
if (RU_output_mask[UE_id] == 0) { // This is the first eNodeB for this UE, clear the buffer
|
||||
|
||||
for (aa=0; aa<nb_antennas_rx; aa++) {
|
||||
memset((void*)r_re_DL[UE_id][aa],0,(RC.ru[0]->frame_parms.samples_per_tti)*sizeof(double));
|
||||
memset((void*)r_im_DL[UE_id][aa],0,(RC.ru[0]->frame_parms.samples_per_tti)*sizeof(double));
|
||||
@@ -244,22 +240,54 @@ void do_DL_sig(channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM
|
||||
frame_parms = &RC.ru[ru_id]->frame_parms;
|
||||
|
||||
sf_offset = (subframe*frame_parms->samples_per_tti) + offset;
|
||||
LOG_D(EMU,"TXPATH: RU %d : DL_sig reading TX for subframe %d (sf_offset %d, length %d) from %p\n",ru_id,subframe,sf_offset,length,txdata[0]+sf_offset);
|
||||
LOG_D(EMU,">>>>>>>>>>>>>>>>>TXPATH: RU %d : DL_sig reading TX for subframe %d (sf_offset %d, length %d) from %p\n",ru_id,subframe,sf_offset,length,txdata[0]+sf_offset);
|
||||
int length_meas = frame_parms->ofdm_symbol_size;
|
||||
tx_pwr = dac_fixed_gain(s_re,
|
||||
s_im,
|
||||
txdata,
|
||||
sf_offset,
|
||||
nb_antennas_tx,
|
||||
length,
|
||||
sf_offset,
|
||||
length_meas,
|
||||
14,
|
||||
frame_parms->pdsch_config_common.referenceSignalPower, // dBm/RE
|
||||
0,
|
||||
&ru_amp[ru_id],
|
||||
frame_parms->N_RB_DL*12);
|
||||
if (sf_offset+length <= frame_parms->samples_per_tti*10) {
|
||||
|
||||
tx_pwr = dac_fixed_gain(s_re,
|
||||
s_im,
|
||||
txdata,
|
||||
sf_offset,
|
||||
nb_antennas_tx,
|
||||
length,
|
||||
sf_offset,
|
||||
length_meas,
|
||||
14,
|
||||
frame_parms->pdsch_config_common.referenceSignalPower, // dBm/RE
|
||||
0,
|
||||
&ru_amp[ru_id],
|
||||
frame_parms->N_RB_DL*12);
|
||||
|
||||
}
|
||||
else {
|
||||
tx_pwr = dac_fixed_gain(s_re,
|
||||
s_im,
|
||||
txdata,
|
||||
sf_offset,
|
||||
nb_antennas_tx,
|
||||
(frame_parms->samples_per_tti*10)-sf_offset,
|
||||
sf_offset,
|
||||
length_meas,
|
||||
14,
|
||||
frame_parms->pdsch_config_common.referenceSignalPower, // dBm/RE
|
||||
0,
|
||||
&ru_amp[ru_id],
|
||||
frame_parms->N_RB_DL*12);
|
||||
|
||||
tx_pwr = dac_fixed_gain(s_re,
|
||||
s_im,
|
||||
txdata,
|
||||
sf_offset,
|
||||
nb_antennas_tx,
|
||||
length+sf_offset-(frame_parms->samples_per_tti*10),
|
||||
sf_offset,
|
||||
length_meas,
|
||||
14,
|
||||
frame_parms->pdsch_config_common.referenceSignalPower, // dBm/RE
|
||||
0,
|
||||
&ru_amp[ru_id],
|
||||
frame_parms->N_RB_DL*12);
|
||||
}
|
||||
#ifdef DEBUG_SIM
|
||||
LOG_D(PHY,"[SIM][DL] subframe %d: txp (time) %d dB\n",
|
||||
subframe,dB_fixed(signal_energy(&txdata[0][sf_offset],length_meas)));
|
||||
@@ -342,7 +370,8 @@ void do_DL_sig(channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM
|
||||
UE_id,ru_id,
|
||||
10*log10(rx_pwr),subframe);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
pthread_mutex_lock(&RU_output_mutex[UE_id]);
|
||||
for (i=0; i<frame_parms->samples_per_tti; i++) {
|
||||
for (aa=0; aa<nb_antennas_rx; aa++) {
|
||||
@@ -356,14 +385,14 @@ void do_DL_sig(channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM
|
||||
|
||||
|
||||
|
||||
double *r_re_p[2] = {r_re_DL[ru_id][0],r_re_DL[ru_id][1]};
|
||||
double *r_im_p[2] = {r_im_DL[ru_id][0],r_im_DL[ru_id][1]};
|
||||
double *r_re_p[2] = {r_re_DL[UE_id][0],r_re_DL[UE_id][1]};
|
||||
double *r_im_p[2] = {r_im_DL[UE_id][0],r_im_DL[UE_id][1]};
|
||||
|
||||
#ifdef DEBUG_SIM
|
||||
rx_pwr = signal_energy_fp(r_re_p,r_im_p,nb_antennas_rx,length<length_meas?length:length_meas,0)/(12.0*frame_parms->N_RB_DL);
|
||||
LOG_D(OCM,"[SIM][DL] UE %d : ADC in %f dBm/RE for subframe %d\n",UE_id,10*log10(rx_pwr),subframe);
|
||||
#endif
|
||||
|
||||
|
||||
rxdata = PHY_vars_UE_g[UE_id][CC_id]->common_vars.rxdata;
|
||||
sf_offset = (subframe*frame_parms->samples_per_tti)+offset;
|
||||
|
||||
@@ -460,7 +489,7 @@ void do_UL_sig(channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM
|
||||
if (((double)PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe] +
|
||||
UE2RU[UE_id][ru_id][CC_id]->path_loss_dB) <= -125.0) {
|
||||
// don't simulate a UE that is too weak
|
||||
LOG_D(OCM,"[SIM][UL] UE %d tx_pwr %d dBm (num_RE %d) for subframe %d (sf_offset %d)\n",
|
||||
LOG_D(OCM,"[SIM][UL] ULPOWERS UE %d tx_pwr %d dBm (num_RE %d) for subframe %d (sf_offset %d)\n",
|
||||
UE_id,
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe],
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe],
|
||||
@@ -479,7 +508,7 @@ void do_UL_sig(channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM
|
||||
1,
|
||||
NULL,
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]); // This make the previous argument the total power
|
||||
LOG_D(OCM,"[SIM][UL] UE %d tx_pwr %f dBm (target %d dBm, num_RE %d) for subframe %d (sf_offset %d)\n",
|
||||
LOG_D(OCM,"[SIM][UL] ULPOWERS UE %d tx_pwr %f dBm (target %d dBm, num_RE %d) for subframe %d (sf_offset %d)\n",
|
||||
UE_id,
|
||||
10*log10(tx_pwr*PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]),
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe],
|
||||
@@ -539,11 +568,11 @@ void do_UL_sig(channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM
|
||||
1e3/UE2RU[0][ru_id][CC_id]->sampling_rate, // sampling time (ns)
|
||||
(double)RC.ru[ru_id]->max_rxgain-(double)RC.ru[ru_id]->att_rx - 66.227); // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
|
||||
|
||||
#ifdef DEBUG_SIM
|
||||
//#ifdef DEBUG_SIM
|
||||
rx_pwr = signal_energy_fp(r_re_p,r_im_p,nb_antennas_rx,frame_parms->samples_per_tti,0);//*(double)frame_parms->ofdm_symbol_size/(12.0*frame_parms->N_RB_DL;
|
||||
LOG_D(OCM,"[SIM][UL] rx_pwr (ADC in) %f dB for subframe %d (rx_gain %f)\n",10*log10(rx_pwr),subframe,
|
||||
(double)RC.ru[ru_id]->max_rxgain-(double)RC.ru[ru_id]->att_rx);
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
rxdata = RC.ru[ru_id]->common.rxdata;
|
||||
sf_offset = subframe*frame_parms->samples_per_tti;
|
||||
|
||||
@@ -524,9 +524,9 @@ void update_mac(Event_t event)
|
||||
|
||||
for(j=0; j<MAX_NUM_LCID; j++) {
|
||||
oai_emulation->mac_config[i].max_allowed_rbs[j]= mac_config[i].max_allowed_rbs[j];
|
||||
UE_list->UE_sched_ctrl[i].max_allowed_rbs[j] = oai_emulation->mac_config[i].max_allowed_rbs[j];
|
||||
UE_list->UE_sched_ctrl[i].max_rbs_allowed_slice[j][0] = oai_emulation->mac_config[i].max_allowed_rbs[j];
|
||||
LOG_I(EMU,"max_allowed_rbs UE %d LCID %d:",i,j);
|
||||
LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[i].max_allowed_rbs[j]);
|
||||
LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[i].max_rbs_allowed_slice[j][0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -646,9 +646,9 @@ void update_mac(Event_t event)
|
||||
if(mac_config->max_allowed_rbs !=NULL) {
|
||||
|
||||
oai_emulation->mac_config[i].max_allowed_rbs[j]= mac_config[i].max_allowed_rbs[j];
|
||||
UE_list->UE_sched_ctrl[i].max_allowed_rbs[j] = oai_emulation->mac_config[i].max_allowed_rbs[j];
|
||||
UE_list->UE_sched_ctrl[i].max_rbs_allowed_slice[j][0] = oai_emulation->mac_config[i].max_allowed_rbs[j];
|
||||
LOG_I(EMU,"max_allowed_rbs UE %d LCID %d:",i,j);
|
||||
LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[i].max_allowed_rbs[j]);
|
||||
LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[i].max_rbs_allowed_slice[j][0]);
|
||||
|
||||
}
|
||||
|
||||
@@ -685,8 +685,8 @@ void update_mac(Event_t event)
|
||||
LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[event.ue].priority[event.lcid]);
|
||||
}
|
||||
} else if(!strcmp((char *) event.key, "DCI_aggregation_min") && event.value!=NULL && validate_mac(event)) {
|
||||
Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
|
||||
mac_config = (Mac_config *) event.value;
|
||||
//Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
|
||||
//mac_config = (Mac_config *) event.value;
|
||||
|
||||
LOG_I(EMU,"DCI_aggregation_min update \n");
|
||||
|
||||
@@ -706,8 +706,8 @@ void update_mac(Event_t event)
|
||||
LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_template[0][event.ue].DCI_aggregation_min);*/
|
||||
}
|
||||
} else if(!strcmp((char *) event.key, "DLSCH_dci_size_bits") && event.value!=NULL && validate_mac(event)) {
|
||||
Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
|
||||
mac_config = (Mac_config *) event.value;
|
||||
//Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
|
||||
//mac_config = (Mac_config *) event.value;
|
||||
|
||||
|
||||
LOG_I(EMU,"DLSCH_dci_size_bits update \n");
|
||||
@@ -951,18 +951,18 @@ void update_mac(Event_t event)
|
||||
|
||||
if(&mac_config[i].max_allowed_rbs[j]!=NULL) {
|
||||
oai_emulation->mac_config[i].max_allowed_rbs[j]= mac_config[i].max_allowed_rbs[j];
|
||||
UE_list->UE_sched_ctrl[i].max_allowed_rbs[j] = oai_emulation->mac_config[i].max_allowed_rbs[j];
|
||||
UE_list->UE_sched_ctrl[i].max_rbs_allowed_slice[j][0] = oai_emulation->mac_config[i].max_allowed_rbs[j];
|
||||
LOG_I(EMU,"max_allowed_rbs UE %d LCID %d:",i,j);
|
||||
LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[i].max_allowed_rbs[j]);
|
||||
LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[i].max_rbs_allowed_slice[j][0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
oai_emulation->mac_config[event.ue].max_allowed_rbs[event.lcid]= mac_config[event.ue].max_allowed_rbs[event.lcid];
|
||||
UE_list->UE_sched_ctrl[event.ue].max_allowed_rbs[event.lcid] = oai_emulation->mac_config[event.ue].max_allowed_rbs[event.lcid];
|
||||
UE_list->UE_sched_ctrl[event.ue].max_rbs_allowed_slice[event.lcid][0] = oai_emulation->mac_config[event.ue].max_allowed_rbs[event.lcid];
|
||||
LOG_I(EMU,"max_allowed_rbs UE %d LCID %d:",event.ue,event.lcid);
|
||||
LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[event.ue].max_allowed_rbs[event.lcid]);
|
||||
LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[event.ue].max_rbs_allowed_slice[event.lcid][0]);
|
||||
}
|
||||
|
||||
} else if(!strcmp((char *) event.key, "max_mcs") && event.value!=NULL && validate_mac(event)) {
|
||||
|
||||
@@ -29,12 +29,12 @@
|
||||
|
||||
#include "init_lte.h"
|
||||
|
||||
#include "PHY/extern.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log_if.h"
|
||||
#include "PHY_INTERFACE/extern.h"
|
||||
#include "PHY_INTERFACE/phy_interface.h"
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
|
||||
PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t eNB_id,
|
||||
@@ -32,10 +32,6 @@ PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t UE_id,
|
||||
uint8_t abstraction_flag);
|
||||
|
||||
PHY_VARS_RN* init_lte_RN(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t RN_id,
|
||||
uint8_t eMBMS_active_state);
|
||||
|
||||
void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
|
||||
uint8_t frame_type,
|
||||
uint8_t tdd_config,
|
||||
|
||||
+131
-294
@@ -41,24 +41,23 @@
|
||||
#include <execinfo.h>
|
||||
|
||||
#include "event_handler.h"
|
||||
#include "SIMULATION/RF/defs.h"
|
||||
#include "SIMULATION/RF/rf.h"
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/LTE_TRANSPORT/proto.h"
|
||||
#include "PHY/vars.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/defs_UE.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_proto.h"
|
||||
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
|
||||
#include "PHY/phy_vars.h"
|
||||
#include "PHY/phy_vars_ue.h"
|
||||
#include "SCHED/sched_common_vars.h"
|
||||
|
||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||
|
||||
//#ifdef OPENAIR2
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/proto.h"
|
||||
#include "LAYER2/MAC/vars.h"
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "LAYER2/MAC/mac_vars.h"
|
||||
#include "pdcp.h"
|
||||
#include "RRC/LITE/vars.h"
|
||||
#include "RRC/LTE/rrc_vars.h"
|
||||
#include "RRC/NAS/nas_config.h"
|
||||
|
||||
#include "SCHED/defs.h"
|
||||
#include "SCHED/vars.h"
|
||||
#include "system.h"
|
||||
|
||||
|
||||
@@ -76,9 +75,7 @@ uint8_t config_smbv = 0;
|
||||
char smbv_ip[16];
|
||||
#endif
|
||||
|
||||
#if defined(FLEXRAN_AGENT_SB_IF)
|
||||
# include "flexran_agent.h"
|
||||
#endif
|
||||
#include "flexran_agent.h"
|
||||
|
||||
|
||||
#include "oaisim_functions.h"
|
||||
@@ -103,6 +100,7 @@ char smbv_ip[16];
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
# include "create_tasks.h"
|
||||
# include "intertask_interface_init.h"
|
||||
#endif
|
||||
|
||||
#include "T.h"
|
||||
@@ -160,6 +158,8 @@ volatile int oai_exit = 0;
|
||||
//int32_t **rxdata;
|
||||
//int32_t **txdata;
|
||||
|
||||
uint16_t sf_ahead=4;
|
||||
uint8_t nfapi_mode = 0;
|
||||
|
||||
// Added for PHY abstraction
|
||||
extern node_list* ue_node_list;
|
||||
@@ -195,6 +195,11 @@ time_stats_t oaisim_stats_f;
|
||||
time_stats_t dl_chan_stats;
|
||||
time_stats_t ul_chan_stats;
|
||||
|
||||
int emulate_rf = 0;
|
||||
int numerology = 0;
|
||||
int codingw = 0;
|
||||
int fepw = 0;
|
||||
|
||||
// this should reflect the channel models in openair1/SIMULATION/TOOLS/defs.h
|
||||
mapping small_scale_names[] = {
|
||||
{ "custom", custom }, { "SCM_A", SCM_A },
|
||||
@@ -216,7 +221,8 @@ oai_shutdown (void);
|
||||
|
||||
void reset_opp_meas_oaisim (void);
|
||||
|
||||
void wait_eNBs() {
|
||||
void wait_eNBs(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -364,7 +370,7 @@ static void set_cli_start(module_id_t module_idP, uint8_t start)
|
||||
#ifdef OPENAIR2
|
||||
int omv_write(int pfd, node_list* enb_node_list, node_list* ue_node_list, Data_Flow_Unit omv_data)
|
||||
{
|
||||
module_id_t i, j;
|
||||
module_id_t i;
|
||||
omv_data.end = 0;
|
||||
|
||||
//omv_data.total_num_nodes = NB_UE_INST + NB_eNB_INST;
|
||||
@@ -377,7 +383,7 @@ int omv_write(int pfd, node_list* enb_node_list, node_list* ue_node_list, Data_F
|
||||
omv_data.geo[i].node_type = 0; //eNB
|
||||
enb_node_list = enb_node_list->next;
|
||||
omv_data.geo[i].Neighbors = 0;
|
||||
|
||||
/*
|
||||
for (j = NB_RU; j < NB_UE_INST + NB_RU; j++) {
|
||||
if (is_UE_active (i, j - NB_RU) == 1) {
|
||||
omv_data.geo[i].Neighbor[omv_data.geo[i].Neighbors] = j;
|
||||
@@ -387,6 +393,7 @@ int omv_write(int pfd, node_list* enb_node_list, node_list* ue_node_list, Data_F
|
||||
"[RU %d][UE %d] is_UE_active(i,j) %d geo (x%d, y%d) num neighbors %d\n", i, j-NB_RU, is_UE_active(i,j-NB_RU), omv_data.geo[i].x, omv_data.geo[i].y, omv_data.geo[i].Neighbors);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,7 +420,7 @@ int omv_write(int pfd, node_list* enb_node_list, node_list* ue_node_list, Data_F
|
||||
|
||||
ue_node_list = ue_node_list->next;
|
||||
omv_data.geo[i].Neighbors = 0;
|
||||
|
||||
/*
|
||||
for (j = 0; j < NB_RU; j++) {
|
||||
if (is_UE_active (j, i - NB_RU) == 1) {
|
||||
omv_data.geo[i].Neighbor[omv_data.geo[i].Neighbors] = j;
|
||||
@@ -423,6 +430,7 @@ int omv_write(int pfd, node_list* enb_node_list, node_list* ue_node_list, Data_F
|
||||
"[UE %d][RU %d] is_UE_active %d geo (x%d, y%d) num neighbors %d\n", i-NB_RU, j, is_UE_active(j,i-NB_RU), omv_data.geo[i].x, omv_data.geo[i].y, omv_data.geo[i].Neighbors);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,7 +501,7 @@ l2l1_task (void *args_p)
|
||||
#undef PRINT_STATS /* this undef is to avoid gcc warnings */
|
||||
#define PRINT_STATS
|
||||
#ifdef PRINT_STATS
|
||||
int len;
|
||||
//int len;
|
||||
FILE *UE_stats[NUMBER_OF_UE_MAX];
|
||||
FILE *UE_stats_th[NUMBER_OF_UE_MAX];
|
||||
FILE *eNB_stats[NUMBER_OF_eNB_MAX];
|
||||
@@ -524,11 +532,6 @@ l2l1_task (void *args_p)
|
||||
}
|
||||
|
||||
}
|
||||
// UL scope at eNB 0
|
||||
form_enb[UE_inst] = create_lte_phy_scope_enb();
|
||||
sprintf (title, "LTE UL SCOPE UE %d to eNB %d", UE_inst, eNB_inst);
|
||||
fl_show_form (form_enb[UE_inst]->lte_phy_scope_enb, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -624,13 +627,8 @@ l2l1_task (void *args_p)
|
||||
}
|
||||
|
||||
#endif
|
||||
module_id_t enb_id;
|
||||
module_id_t UE_id;
|
||||
|
||||
|
||||
if (abstraction_flag == 1) {
|
||||
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++)
|
||||
dl_phy_sync_success (UE_id, 0, 0,1); //UE_id%NB_eNB_INST);
|
||||
}
|
||||
|
||||
start_meas (&oaisim_stats);
|
||||
|
||||
@@ -699,8 +697,8 @@ l2l1_task (void *args_p)
|
||||
//oai_emulation.info.time_ms += 1;
|
||||
oai_emulation.info.time_s += 0.01; // emu time in s, each frame lasts for 10 ms // JNote: TODO check the coherency of the time and frame (I corrected it to 10 (instead of 0.01)
|
||||
|
||||
update_omg (frame); // frequency is defined in the omg_global params configurable by the user
|
||||
update_omg_ocm ();
|
||||
//update_omg (frame); // frequency is defined in the omg_global params configurable by the user
|
||||
//update_omg_ocm ();
|
||||
|
||||
#ifdef OPENAIR2
|
||||
|
||||
@@ -740,19 +738,16 @@ l2l1_task (void *args_p)
|
||||
|
||||
CC_id=0;
|
||||
int all_done=0;
|
||||
|
||||
while (all_done==0) {
|
||||
|
||||
pthread_mutex_lock(&subframe_mutex);
|
||||
int subframe_ru_mask_local = subframe_ru_mask;
|
||||
int subframe_UE_mask_local = subframe_UE_mask;
|
||||
int subframe_ru_mask_local = (subframe_select(&RC.ru[0]->frame_parms,(sf+4)%10)!=SF_UL) ? subframe_ru_mask : ((1<<NB_RU)-1);
|
||||
int subframe_UE_mask_local = (RC.ru[0]->frame_parms.frame_type == FDD || subframe_select(&RC.ru[0]->frame_parms,(sf+4)%10)!=SF_DL) ? subframe_UE_mask : ((1<<NB_UE_INST)-1);
|
||||
pthread_mutex_unlock(&subframe_mutex);
|
||||
LOG_D(EMU,"Frame %d, Subframe %d: Checking masks %x,%x\n",frame,sf,subframe_ru_mask_local,subframe_UE_mask_local);
|
||||
LOG_D(EMU,"Frame %d, Subframe %d, NB_RU %d, NB_UE %d: Checking masks %x,%x\n",frame,sf,NB_RU,NB_UE_INST,subframe_ru_mask_local,subframe_UE_mask_local);
|
||||
if ((subframe_ru_mask_local == ((1<<NB_RU)-1)) &&
|
||||
(subframe_UE_mask_local == ((1<<NB_UE_INST)-1)))
|
||||
all_done=1;
|
||||
else
|
||||
usleep(1500);
|
||||
(subframe_UE_mask_local == ((1<<NB_UE_INST)-1))) all_done=1;
|
||||
else usleep(1500);
|
||||
}
|
||||
|
||||
|
||||
@@ -772,11 +767,11 @@ l2l1_task (void *args_p)
|
||||
*/
|
||||
for (ru_id=0;ru_id<NB_RU;ru_id++) {
|
||||
current_ru_rx_timestamp[ru_id][CC_id] += RC.ru[ru_id]->frame_parms.samples_per_tti;
|
||||
LOG_D(EMU,"RU %d/%d: TS %llu\n",ru_id,CC_id,current_ru_rx_timestamp[ru_id][CC_id]);
|
||||
LOG_D(EMU,"RU %d/%d: TS %"PRIi64"\n",ru_id,CC_id,current_ru_rx_timestamp[ru_id][CC_id]);
|
||||
}
|
||||
for (UE_inst = 0; UE_inst<NB_UE_INST;UE_inst++) {
|
||||
current_UE_rx_timestamp[UE_inst][CC_id] += PHY_vars_UE_g[UE_inst][CC_id]->frame_parms.samples_per_tti;
|
||||
LOG_D(EMU,"UE %d/%d: TS %llu\n",UE_id,CC_id,current_UE_rx_timestamp[UE_inst][CC_id]);
|
||||
LOG_D(EMU,"UE %d/%d: TS %"PRIi64"\n",UE_inst,CC_id,current_UE_rx_timestamp[UE_inst][CC_id]);
|
||||
}
|
||||
|
||||
for (eNB_inst = oai_emulation.info.first_enb_local;
|
||||
@@ -797,15 +792,6 @@ l2l1_task (void *args_p)
|
||||
PHY_vars_eNB_g[eNB_inst][0]->frame_parms.Nid_cell);
|
||||
|
||||
*/
|
||||
#ifdef OPENAIR2
|
||||
//Application: traffic gen
|
||||
update_otg_eNB (eNB_inst, oai_emulation.info.time_ms);
|
||||
|
||||
//IP/OTG to PDCP and PDCP to IP operation
|
||||
// pdcp_run (frame, 1, 0, eNB_inst); //PHY_vars_eNB_g[eNB_id]->Mod_id
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PRINT_STATS
|
||||
|
||||
if((sf==9) && frame%10==0)
|
||||
@@ -819,9 +805,7 @@ l2l1_task (void *args_p)
|
||||
fwrite (stats_buffer, 1, len, eNB_stats[eNB_inst]);
|
||||
fflush(eNB_stats[eNB_inst]);
|
||||
}
|
||||
*/
|
||||
#ifdef OPENAIR2
|
||||
|
||||
if (eNB_l2_stats) {
|
||||
len = dump_eNB_l2_stats (stats_buffer, 0);
|
||||
rewind (eNB_l2_stats);
|
||||
@@ -830,6 +814,7 @@ l2l1_task (void *args_p)
|
||||
}
|
||||
|
||||
#endif
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
}// eNB_inst loop
|
||||
@@ -840,200 +825,6 @@ l2l1_task (void *args_p)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
clear_UE_transport_info (oai_emulation.info.nb_ue_local);
|
||||
clear_UE_transport_info (oai_emulation.info.nb_ue_local);
|
||||
|
||||
for (UE_inst = oai_emulation.info.first_ue_local;
|
||||
(UE_inst < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local));
|
||||
UE_inst++) {
|
||||
if (oai_emulation.info.cli_start_ue[UE_inst] != 0) {
|
||||
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
|
||||
#else
|
||||
|
||||
if (frame >= (UE_inst * 20)) // activate UE only after 20*UE_id frames so that different UEs turn on separately
|
||||
#endif
|
||||
{
|
||||
LOG_D(EMU,
|
||||
"PHY procedures UE %d for frame %d, slot %d (subframe TX %d, RX %d)\n",
|
||||
UE_inst, frame % MAX_FRAME_NUMBER, slot, next_slot >> 1,
|
||||
last_slot >> 1);
|
||||
|
||||
if (PHY_vars_UE_g[UE_inst][0]->UE_mode[0]
|
||||
!= NOT_SYNCHED) {
|
||||
if (frame > 0) {
|
||||
PHY_vars_UE_g[UE_inst][0]->frame_rx = frame % MAX_FRAME_NUMBER;
|
||||
PHY_vars_UE_g[UE_inst][0]->slot_rx = last_slot;
|
||||
PHY_vars_UE_g[UE_inst][0]->slot_tx = next_slot;
|
||||
|
||||
if (next_slot > 1)
|
||||
PHY_vars_UE_g[UE_inst][0]->frame_tx = frame % MAX_FRAME_NUMBER;
|
||||
else
|
||||
PHY_vars_UE_g[UE_inst][0]->frame_tx = (frame + 1) % MAX_FRAME_NUMBER;
|
||||
#ifdef OPENAIR2
|
||||
//Application
|
||||
update_otg_UE (UE_inst, oai_emulation.info.time_ms);
|
||||
|
||||
//Access layer
|
||||
// PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE_inst, ENB_FLAG_NO, NOT_A_RNTI, frame, next_slot>>1, 0);
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE_inst, 0, ENB_FLAG_NO, NOT_A_RNTI, frame % MAX_FRAME_NUMBER, next_slot);
|
||||
pdcp_run (&ctxt);
|
||||
#endif
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs;
|
||||
CC_id++) {
|
||||
phy_procedures_UE_lte (
|
||||
PHY_vars_UE_g[UE_inst][CC_id],
|
||||
0, abstraction_flag,
|
||||
normal_txrx, no_relay,
|
||||
NULL);
|
||||
}
|
||||
|
||||
ue_data[UE_inst]->tx_power_dBm =
|
||||
PHY_vars_UE_g[UE_inst][0]->tx_power_dBm;
|
||||
}
|
||||
} else {
|
||||
if (abstraction_flag == 1) {
|
||||
LOG_E(EMU,
|
||||
"sync not supported in abstraction mode (UE%d,mode%d)\n",
|
||||
UE_inst,
|
||||
PHY_vars_UE_g[UE_inst][0]->UE_mode[0]);
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
if ((frame > 0)
|
||||
&& (last_slot
|
||||
== (LTE_SLOTS_PER_FRAME
|
||||
- 2))) {
|
||||
initial_sync (PHY_vars_UE_g[UE_inst][0],
|
||||
normal_txrx);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PRINT_STATS
|
||||
|
||||
if(last_slot==2 && frame%10==0) {
|
||||
if (UE_stats_th[UE_inst]) {
|
||||
fprintf(UE_stats_th[UE_inst],"%d %d\n",frame%MAX_FRAME_NUMBER, PHY_vars_UE_g[UE_inst][0]->bitrate[0]/1000);
|
||||
}
|
||||
}
|
||||
|
||||
if (UE_stats[UE_inst]) {
|
||||
len = dump_ue_stats (PHY_vars_UE_g[UE_inst][0], stats_buffer, 0, normal_txrx, 0);
|
||||
rewind (UE_stats[UE_inst]);
|
||||
fwrite (stats_buffer, 1, len, UE_stats[UE_inst]);
|
||||
fflush(UE_stats[UE_inst]);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
|
||||
for (RN_id=oai_emulation.info.first_rn_local;
|
||||
RN_id<oai_emulation.info.first_rn_local+oai_emulation.info.nb_rn_local;
|
||||
RN_id++) {
|
||||
// UE id and eNB id of the RN
|
||||
UE_inst= oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local + RN_id;// NB_UE_INST + RN_id
|
||||
eNB_inst= oai_emulation.info.first_enb_local+oai_emulation.info.nb_enb_local + RN_id;// NB_eNB_INST + RN_id
|
||||
|
||||
// currently only works in FDD
|
||||
if (oai_emulation.info.eMBMS_active_state == 4) {
|
||||
r_type = multicast_relay;
|
||||
//LOG_I(EMU,"Activating the multicast relaying\n");
|
||||
} else {
|
||||
LOG_E(EMU,"Not supported eMBMS option when relaying is enabled %d\n", r_type);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
PHY_vars_RN_g[RN_id]->frame = frame % MAX_FRAME_NUMBER;
|
||||
|
||||
if ( oai_emulation.info.frame_type == 0) {
|
||||
// RN == UE
|
||||
if (frame>0) {
|
||||
if (PHY_vars_UE_g[UE_inst][0]->UE_mode[0] != NOT_SYNCHED) {
|
||||
LOG_D(EMU,"[RN %d] PHY procedures UE %d for frame %d, slot %d (subframe TX %d, RX %d)\n",
|
||||
RN_id, UE_inst, frame, slot, next_slot >> 1,last_slot>>1);
|
||||
PHY_vars_UE_g[UE_inst][0]->frame_rx = frame % MAX_FRAME_NUMBER;
|
||||
PHY_vars_UE_g[UE_inst][0]->slot_rx = last_slot;
|
||||
PHY_vars_UE_g[UE_inst][0]->slot_tx = next_slot;
|
||||
|
||||
if (next_slot>1) PHY_vars_UE_g[UE_inst][0]->frame_tx = frame % MAX_FRAME_NUMBER;
|
||||
else PHY_vars_UE_g[UE_inst][0]->frame_tx = (frame+1) % MAX_FRAME_NUMBER;
|
||||
|
||||
phy_procedures_UE_lte (PHY_vars_UE_g[UE_inst][0], 0, abstraction_flag,normal_txrx,
|
||||
r_type, PHY_vars_RN_g[RN_id]);
|
||||
} else if (last_slot == (LTE_SLOTS_PER_FRAME-2)) {
|
||||
initial_sync(PHY_vars_UE_g[UE_inst][0],normal_txrx);
|
||||
}
|
||||
}
|
||||
|
||||
emu_transport (frame % MAX_FRAME_NUMBER, sf<<1, ((sf+4)%10)<<1, subframe_select(&PHY_vars_eNB_g[0][0]->frame_parms,sf),
|
||||
oai_emulation.info.frame_type[0], ethernet_flag);
|
||||
|
||||
start_meas (&dl_chan_stats);
|
||||
|
||||
for (UE_inst = 0; UE_inst < NB_UE_INST; UE_inst++)
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
//#warning figure out what to do with UE frame_parms during initial_sync
|
||||
do_DL_sig (r_re0,
|
||||
r_im0,
|
||||
r_re,
|
||||
r_im,
|
||||
s_re,
|
||||
s_im,
|
||||
eNB2UE,
|
||||
enb_data,
|
||||
ue_data,
|
||||
PHY_vars_eNB_g[0][CC_id]->proc.proc_rxtx[sf&1].subframe_tx<<1,
|
||||
abstraction_flag,
|
||||
&PHY_vars_eNB_g[0][CC_id]->frame_parms,
|
||||
UE_inst, CC_id);
|
||||
do_DL_sig (r_re0,
|
||||
r_im0,
|
||||
r_re,
|
||||
r_im,n
|
||||
|
||||
s_re,
|
||||
s_im,
|
||||
eNB2UE,
|
||||
enb_data,
|
||||
ue_data,
|
||||
(PHY_vars_eNB_g[0][CC_id]->proc.proc_rxtx[sf&1].subframe_tx<<1)+1,
|
||||
abstraction_flag,
|
||||
&PHY_vars_eNB_g[0][CC_id]->frame_parms,
|
||||
UE_inst, CC_id);
|
||||
}
|
||||
|
||||
stop_meas (&dl_chan_stats);
|
||||
|
||||
|
||||
start_meas (&ul_chan_stats);
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
//#warning figure out what to do with UE frame_parms during initial_sync
|
||||
do_UL_sig (r_re0, r_im0, r_re, r_im, s_re, s_im, UE2eNB,
|
||||
enb_data, ue_data,
|
||||
PHY_vars_UE_g[0][CC_id]->proc.proc_rxtx[sf&1].subframe_tx<<1,
|
||||
abstraction_flag,
|
||||
&PHY_vars_eNB_g[0][CC_id]->frame_parms,
|
||||
frame % MAX_FRAME_NUMBER, CC_id);
|
||||
do_UL_sig (r_re0, r_im0, r_re, r_im, s_re, s_im, UE2eNB,
|
||||
enb_data, ue_data,
|
||||
(PHY_vars_UE_g[0][CC_id]->proc.proc_rxtx[sf&1].subframe_tx<<1)+1,
|
||||
abstraction_flag,
|
||||
&PHY_vars_eNB_g[0][CC_id]->frame_parms,
|
||||
frame % MAX_FRAME_NUMBER, CC_id);
|
||||
}
|
||||
|
||||
stop_meas (&ul_chan_stats);
|
||||
|
||||
*/
|
||||
|
||||
if ((sf == 0) && ((frame % MAX_FRAME_NUMBER) == 0) && (abstraction_flag == 0)
|
||||
&& (oai_emulation.info.n_frames == 1)) {
|
||||
|
||||
@@ -1070,7 +861,7 @@ l2l1_task (void *args_p)
|
||||
|
||||
|
||||
}
|
||||
update_ocm ();
|
||||
//update_ocm ();
|
||||
/*
|
||||
if ((frame >= 10) && (frame <= 11) && (abstraction_flag == 0)
|
||||
#ifdef PROC
|
||||
@@ -1185,6 +976,23 @@ l2l1_task (void *args_p)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* The following two functions are meant to restart *the lte-softmodem* and are
|
||||
* here to make oaisim compile. A restart command from the controller will be
|
||||
* ignored in oaisim.
|
||||
*/
|
||||
int stop_L1L2(int enb_id)
|
||||
{
|
||||
LOG_W(FLEXRAN_AGENT, "stop_L1L2() not supported in oaisim\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int restart_L1L2(int enb_id)
|
||||
{
|
||||
LOG_W(FLEXRAN_AGENT, "restart_L1L2() not supported in oaisim\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if T_TRACER
|
||||
int T_wait = 1; /* by default we wait for the tracer */
|
||||
int T_port = 2021; /* default port to listen to to wait for the tracer */
|
||||
@@ -1192,8 +1000,8 @@ int T_dont_fork = 0; /* default is to fork, see 'T_init' to understand */
|
||||
#endif
|
||||
|
||||
|
||||
void wait_RUs() {
|
||||
|
||||
void wait_RUs(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
// wait for all RUs to be configured over fronthaul
|
||||
@@ -1237,9 +1045,23 @@ void wait_RUs() {
|
||||
printf("RUs are ready, let's go\n");
|
||||
}
|
||||
|
||||
void init_UE(int,int,int);
|
||||
void init_UE(int,int,int,int);
|
||||
void init_RU(const char*);
|
||||
|
||||
void set_UE_defaults(int nb_ue) {
|
||||
|
||||
for (int UE_id = 0;UE_id<nb_ue;UE_id++) {
|
||||
for (int CC_id = 0;CC_id<MAX_NUM_CCs;CC_id++) {
|
||||
for (uint8_t i=0; i<RX_NB_TH_MAX; i++) {
|
||||
PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[i][0]->dciFormat = 0;
|
||||
PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[i][0]->agregationLevel = 0xFF;
|
||||
}
|
||||
PHY_vars_UE_g[UE_id][CC_id]->current_dlsch_cqi[0] = 10;
|
||||
PHY_vars_UE_g[UE_id][CC_id]->tx_power_max_dBm = 23;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void print_current_directory(void)
|
||||
{
|
||||
@@ -1250,9 +1072,9 @@ static void print_current_directory(void)
|
||||
printf("working directory: %s\n", dir);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
void init_devices(void);
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
|
||||
clock_t t;
|
||||
@@ -1270,12 +1092,12 @@ main (int argc, char **argv)
|
||||
int node_id;
|
||||
int port,Process_Flag=0,wgt,Channel_Flag=0,temp;
|
||||
#endif
|
||||
int i;
|
||||
|
||||
//default parameters
|
||||
oai_emulation.info.n_frames = MAX_FRAME_NUMBER; //1024; //10;
|
||||
oai_emulation.info.n_frames_flag = 0; //fixme
|
||||
snr_dB = 30;
|
||||
NB_UE_INST = 1;
|
||||
|
||||
//Default values if not changed by the user in get_simulation_options();
|
||||
pdcp_period = 1;
|
||||
@@ -1292,7 +1114,7 @@ main (int argc, char **argv)
|
||||
// start thread for log gen
|
||||
log_thread_init ();
|
||||
|
||||
init_oai_emulation (); // to initialize everything !!!
|
||||
//init_oai_emulation (); // to initialize everything !!!
|
||||
|
||||
// get command-line options
|
||||
get_simulation_options (argc, argv); //Command-line options
|
||||
@@ -1329,7 +1151,37 @@ main (int argc, char **argv)
|
||||
|
||||
#endif
|
||||
// configure oaisim with OCG
|
||||
oaisim_config (); // config OMG and OCG, OPT, OTG, OLG
|
||||
//oaisim_config (); // config OMG and OCG, OPT, OTG, OLG
|
||||
logInit();
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, oai_emulation.info.itti_dump_file);
|
||||
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
|
||||
#endif
|
||||
|
||||
set_glog(LOG_INFO, 0x15);
|
||||
|
||||
|
||||
//set_log(OCG, LOG_DEBUG, 1);
|
||||
//set_log(EMU, LOG_INFO, 20);
|
||||
set_log(MAC, LOG_DEBUG, 1);
|
||||
set_log(RLC, LOG_TRACE, 1);
|
||||
//set_log(PHY, LOG_DEBUG, 1);
|
||||
set_log(PDCP, LOG_TRACE, 1);
|
||||
set_log(RRC, LOG_DEBUG, 1);
|
||||
//set_log(OCM, LOG_INFO, 20);
|
||||
//set_log(OTG, LOG_INFO, 1);
|
||||
set_comp_log(OCG, LOG_ERR, 0x15,1);
|
||||
set_comp_log(EMU, LOG_DEBUG, 0x15,20);
|
||||
set_comp_log(MAC, LOG_TRACE, 0x15,1);
|
||||
set_comp_log(RLC, LOG_TRACE, 0x15,1);
|
||||
set_comp_log(PHY, LOG_TRACE, 0x15, 1);
|
||||
set_comp_log(PDCP, LOG_DEBUG, 0x15,1);
|
||||
set_comp_log(RRC, LOG_DEBUG, 0x15,1);
|
||||
set_comp_log(OCM, LOG_DEBUG, 0x15,20);
|
||||
set_comp_log(OTG, LOG_DEBUG, 0x15,1);
|
||||
set_comp_log(OMG, LOG_NOTICE, 0x15,1);
|
||||
set_comp_log(OPT, LOG_ERR, 0x15,1);
|
||||
|
||||
if (ue_connection_test == 1) {
|
||||
snr_direction = -snr_step;
|
||||
@@ -1341,15 +1193,11 @@ main (int argc, char **argv)
|
||||
pthread_mutex_init(&sync_mutex, NULL);
|
||||
pthread_mutex_init(&subframe_mutex, NULL);
|
||||
|
||||
#ifdef OPENAIR2
|
||||
init_omv ();
|
||||
#endif
|
||||
//Before this call, NB_UE_INST and NB_eNB_INST are not set correctly
|
||||
check_and_adjust_params ();
|
||||
|
||||
set_seed = oai_emulation.emulation_config.seed.value;
|
||||
|
||||
init_otg_pdcp_buffer ();
|
||||
|
||||
init_seed (set_seed);
|
||||
|
||||
@@ -1364,17 +1212,20 @@ main (int argc, char **argv)
|
||||
|
||||
|
||||
|
||||
if (create_tasks(0,
|
||||
oai_emulation.info.nb_ue_local) < 0)
|
||||
if (create_tasks_ue(NB_UE_INST) < 0)
|
||||
exit(-1); // need a softer mode
|
||||
|
||||
|
||||
printf("Waiting for RUs to get set up\n");
|
||||
wait_RUs();
|
||||
|
||||
init_UE(NB_UE_INST,0,0);
|
||||
init_UE(NB_UE_INST,0,0,1);
|
||||
|
||||
set_UE_defaults(NB_UE_INST);
|
||||
|
||||
|
||||
init_ocm ();
|
||||
|
||||
printf("Sending sync to all threads\n");
|
||||
|
||||
|
||||
@@ -1383,12 +1234,6 @@ main (int argc, char **argv)
|
||||
pthread_cond_broadcast(&sync_cond);
|
||||
pthread_mutex_unlock(&sync_mutex);
|
||||
|
||||
#ifdef SMBV
|
||||
// Rohde&Schwarz SMBV100A vector signal generator
|
||||
smbv_init_config(smbv_fname, smbv_nframes);
|
||||
smbv_write_config_from_frame_parms(smbv_fname, &PHY_vars_eNB_g[0][0]->frame_parms);
|
||||
#endif
|
||||
|
||||
/* #if defined (FLEXRAN_AGENT_SB_IF)
|
||||
flexran_agent_start();
|
||||
#endif */
|
||||
@@ -1493,6 +1338,8 @@ reset_opp_meas_oaisim (void)
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_turbo_encoding_stats);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_interleaving_stats);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_multiplexing_stats);
|
||||
|
||||
|
||||
/*
|
||||
* L2 functions
|
||||
*/
|
||||
@@ -1513,6 +1360,7 @@ reset_opp_meas_oaisim (void)
|
||||
reset_meas (&UE_pdcp_stats[UE_id].pdcp_ip);
|
||||
reset_meas (&UE_pdcp_stats[UE_id].ip_pdcp);
|
||||
|
||||
|
||||
}
|
||||
|
||||
for (eNB_id = 0; eNB_id < NB_eNB_INST; eNB_id++) {
|
||||
@@ -1633,8 +1481,10 @@ print_opp_meas_oaisim (void)
|
||||
&oaisim_stats, &oaisim_stats_f);
|
||||
|
||||
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx,
|
||||
"[UE][total_phy_proc_rx]", &oaisim_stats, &oaisim_stats_f);
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[0],
|
||||
"[UE][total_phy_proc_rx[0]]", &oaisim_stats, &oaisim_stats_f);
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[1],
|
||||
"[UE][total_phy_proc_rx[1]]", &oaisim_stats, &oaisim_stats_f);
|
||||
// print_meas (&PHY_vars_UE_g[UE_id][0]->ofdm_demod_stats,
|
||||
// "[UE][ofdm_demod]", &oaisim_stats, &oaisim_stats_f);
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->rx_dft_stats, "[UE][rx_dft]",
|
||||
@@ -1892,11 +1742,6 @@ oai_shutdown (void)
|
||||
|
||||
#endif
|
||||
|
||||
//Perform KPI measurements
|
||||
if (oai_emulation.info.otg_enabled == 1){
|
||||
LOG_N(EMU,"calling OTG kpi gen .... \n");
|
||||
kpi_gen ();
|
||||
}
|
||||
if (oai_emulation.info.opp_enabled == 1)
|
||||
print_opp_meas_oaisim ();
|
||||
|
||||
@@ -1951,18 +1796,6 @@ oai_shutdown (void)
|
||||
}
|
||||
} //End of PHY abstraction changes
|
||||
|
||||
#ifdef OPENAIR2
|
||||
mac_top_cleanup ();
|
||||
#endif
|
||||
|
||||
// stop OMG
|
||||
stop_mobility_generator (omg_param_list); //omg_param_list.mobility_type
|
||||
#ifdef OPENAIR2
|
||||
|
||||
if (oai_emulation.info.omv_enabled == 1)
|
||||
omv_end (pfd[1], omv_data);
|
||||
|
||||
#endif
|
||||
|
||||
if ((oai_emulation.info.ocm_enabled == 1) && (ethernet_flag == 0)
|
||||
&& (ShaF != NULL)) {
|
||||
@@ -1973,9 +1806,6 @@ oai_shutdown (void)
|
||||
if (opt_enabled == 1)
|
||||
terminate_opt ();
|
||||
|
||||
if (oai_emulation.info.cli_enabled)
|
||||
cli_server_cleanup ();
|
||||
|
||||
for (int i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++)
|
||||
if (oai_emulation.info.oai_ifup[i] == 1) {
|
||||
char interfaceName[8];
|
||||
@@ -2006,3 +1836,10 @@ get_OAI_emulation ()
|
||||
}
|
||||
|
||||
|
||||
// dummy function declarations
|
||||
|
||||
void *rrc_enb_task(void *args_p)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,15 +26,16 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "SIMULATION/TOOLS/defs.h"
|
||||
#include "SIMULATION/RF/defs.h"
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "SIMULATION/RF/rf.h"
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/defs_UE.h"
|
||||
#include "oaisim_config.h"
|
||||
#include "init_lte.h"
|
||||
|
||||
#ifdef OPENAIR2
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "UTIL/OMV/structures.h"
|
||||
#endif
|
||||
|
||||
@@ -48,10 +49,11 @@ void do_UL_sig(channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM
|
||||
uint32_t frame,int eNB_id,uint8_t CC_id);
|
||||
|
||||
void do_DL_sig(channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM_CCs],
|
||||
node_desc_t *enb_data[NUMBER_OF_RU_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],
|
||||
node_desc_t *enb_data[NUMBER_OF_RU_MAX],
|
||||
node_desc_t *ue_data[NUMBER_OF_UE_MAX],
|
||||
uint16_t subframe,
|
||||
uint16_t offset,
|
||||
uint16_t length,
|
||||
uint32_t offset,
|
||||
uint32_t length,
|
||||
uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,uint8_t UE_id,int CC_id);
|
||||
|
||||
void init_ue(node_desc_t *ue_data, UE_Antenna ue_ant);//Abstraction changes
|
||||
|
||||
@@ -49,10 +49,8 @@ The current sturcture of oaisim is shown by the figure.
|
||||
#include "UTIL/OPT/opt.h" // to test OPT
|
||||
#include "UTIL/OMG/omg.h"
|
||||
#include "UTIL/CLI/cli_if.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/extern.h"
|
||||
#include "SIMULATION/ETH_TRANSPORT/defs.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
|
||||
/** @defgroup _init_oai Initial oaisim
|
||||
* @ingroup _fn
|
||||
|
||||
@@ -43,29 +43,22 @@
|
||||
#include "assertions.h"
|
||||
#include "oaisim_functions.h"
|
||||
|
||||
#include "PHY/extern.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#ifdef OPENAIR2
|
||||
#include "LAYER2/MAC/proto.h"
|
||||
#endif
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/phy_extern_ue.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "LAYER2/PDCP_v10.1.0/pdcp.h"
|
||||
#include "LAYER2/PDCP_v10.1.0/pdcp_primitives.h"
|
||||
#include "RRC/LITE/extern.h"
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#include "PHY_INTERFACE/extern.h"
|
||||
#include "PHY_INTERFACE/phy_interface_extern.h"
|
||||
//#include "ARCH/CBMIMO1/DEVICE_DRIVER/extern.h"
|
||||
#include "SCHED/extern.h"
|
||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||
#include "UTIL/OCG/OCG_extern.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "UTIL/OTG/otg_config.h"
|
||||
#include "UTIL/OTG/otg_tx.h"
|
||||
#if ENABLE_RAL
|
||||
#include "lteRALenb.h"
|
||||
#include "lteRALue.h"
|
||||
#endif
|
||||
|
||||
#include "cor_SF_sim.h"
|
||||
#include "enb_config.h"
|
||||
|
||||
@@ -80,10 +73,8 @@
|
||||
#include "../../ARCH/COMMON/common_lib.h"
|
||||
#include "../../ARCH/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
|
||||
#ifdef SMBV
|
||||
extern uint8_t config_smbv;
|
||||
extern char smbv_ip[16];
|
||||
#endif
|
||||
#include "ENB_APP/enb_paramdef.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
|
||||
//constant for OAISIM soft realtime calibration
|
||||
#define SF_DEVIATION_OFFSET_NS 100000 //= 0.1ms : should be as a number of UE
|
||||
@@ -134,34 +125,14 @@ int sleep_time_us = 0;
|
||||
|
||||
int phy_test = 0;
|
||||
|
||||
#ifdef OPENAIR2
|
||||
// omv related info
|
||||
//pid_t omv_pid;
|
||||
char full_name[200];
|
||||
extern int pfd[2]; // fd for omv : fixme: this could be a local var
|
||||
char fdstr[10];
|
||||
char frames[10];
|
||||
char num_enb[10];
|
||||
char num_ue[10];
|
||||
//area_x, area_y and area_z for omv
|
||||
char x_area[20];
|
||||
char y_area[20];
|
||||
char z_area[20];
|
||||
char nb_antenna[20];
|
||||
char frame_type[10];
|
||||
char tdd_config[10];
|
||||
#endif
|
||||
|
||||
Packet_OTG_List_t *otg_pdcp_buffer = NULL;
|
||||
|
||||
extern node_desc_t *enb_data[NUMBER_OF_RU_MAX];
|
||||
extern node_desc_t *ue_data[NUMBER_OF_UE_MAX];
|
||||
extern channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM_CCs];
|
||||
extern channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM_CCs];
|
||||
extern node_desc_t *ue_data[MAX_MOBILES_PER_ENB];
|
||||
extern channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][MAX_MOBILES_PER_ENB][MAX_NUM_CCs];
|
||||
extern channel_desc_t *UE2RU[MAX_MOBILES_PER_ENB][NUMBER_OF_RU_MAX][MAX_NUM_CCs];
|
||||
|
||||
extern mapping small_scale_names[];
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
extern pdcp_mbms_t pdcp_mbms_array_ue[NUMBER_OF_UE_MAX][maxServiceCount][maxSessionPerPMCH];
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
extern pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH];
|
||||
extern pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH];
|
||||
#endif
|
||||
|
||||
@@ -177,6 +148,18 @@ extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
int oaisim_flag=1;
|
||||
|
||||
|
||||
void RCConfig_sim(void) {
|
||||
|
||||
paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0};
|
||||
|
||||
|
||||
// Get num RU instances
|
||||
config_getlist( &RUParamList,NULL,0, NULL);
|
||||
RC.nb_RU = RUParamList.numelt;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void get_simulation_options(int argc, char *argv[])
|
||||
{
|
||||
int option;
|
||||
@@ -686,7 +669,7 @@ void get_simulation_options(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
oai_emulation.info.nb_ue_local = atoi (optarg);
|
||||
NB_UE_INST = atoi (optarg);
|
||||
break;
|
||||
|
||||
case 'U':
|
||||
@@ -782,13 +765,13 @@ void get_simulation_options(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if ( load_configmodule(argc,argv) == NULL) {
|
||||
if ( load_configmodule(argc,argv) == NULL) {
|
||||
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
||||
}
|
||||
|
||||
if (RC.config_file_name != NULL) {
|
||||
/* Read eNB configuration file */
|
||||
RCConfig();
|
||||
RCConfig_sim();
|
||||
printf("returned with %d eNBs, %d rus\n",RC.nb_inst,RC.nb_RU);
|
||||
oai_emulation.info.nb_enb_local = RC.nb_inst;
|
||||
oai_emulation.info.nb_ru_local = RC.nb_RU;
|
||||
@@ -853,15 +836,15 @@ void check_and_adjust_params(void)
|
||||
{
|
||||
|
||||
int32_t ret;
|
||||
int i,j;
|
||||
//int i,j;
|
||||
|
||||
if (oai_emulation.info.nb_ue_local + oai_emulation.info.nb_rn_local > NUMBER_OF_UE_MAX) {
|
||||
LOG_E(EMU,"Enter fewer than %d UEs/RNs for the moment or change the NUMBER_OF_UE_MAX\n", NUMBER_OF_UE_MAX);
|
||||
if (oai_emulation.info.nb_ue_local + oai_emulation.info.nb_rn_local > MAX_MOBILES_PER_ENB) {
|
||||
LOG_E(EMU,"Enter fewer than %d UEs/RNs for the moment or change the MAX_MOBILES_PER_ENB\n", MAX_MOBILES_PER_ENB);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (oai_emulation.info.nb_enb_local + oai_emulation.info.nb_rn_local > NUMBER_OF_eNB_MAX) {
|
||||
LOG_E(EMU,"Enter fewer than %d eNBs/RNs for the moment or change the NUMBER_OF_UE_MAX\n", NUMBER_OF_eNB_MAX);
|
||||
LOG_E(EMU,"Enter fewer than %d eNBs/RNs for the moment or change the MAX_MOBILES_PER_ENB\n", NUMBER_OF_eNB_MAX);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -916,80 +899,15 @@ void check_and_adjust_params(void)
|
||||
} // ethernet flag
|
||||
*/
|
||||
//
|
||||
NB_UE_INST = oai_emulation.info.nb_ue_local + oai_emulation.info.nb_ue_remote;
|
||||
NB_eNB_INST = oai_emulation.info.nb_enb_local + oai_emulation.info.nb_enb_remote;
|
||||
NB_RN_INST = oai_emulation.info.nb_rn_local + oai_emulation.info.nb_rn_remote;
|
||||
NB_RU = oai_emulation.info.nb_ru_local + oai_emulation.info.nb_ru_remote;
|
||||
|
||||
NB_RU = RC.nb_RU;
|
||||
|
||||
#if defined(PDCP_USE_NETLINK_QUEUES) && defined(OPENAIR2)
|
||||
pdcp_netlink_init();
|
||||
#endif
|
||||
|
||||
if (NB_RN_INST > 0 ) {
|
||||
LOG_N(EMU,"Total number of RN %d (local %d, remote %d) mobility (the same as eNB) %s \n", NB_RN_INST,oai_emulation.info.nb_rn_local,oai_emulation.info.nb_rn_remote,
|
||||
oai_emulation.topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option);
|
||||
|
||||
LOG_N(EMU,"Adjust the number of eNB inst (%d->%d) and UE inst (%d->%d)\n ",
|
||||
NB_eNB_INST, NB_eNB_INST+NB_RN_INST,
|
||||
NB_UE_INST, NB_UE_INST+NB_RN_INST);
|
||||
NB_eNB_INST+=NB_RN_INST;
|
||||
NB_UE_INST+=NB_RN_INST;
|
||||
}
|
||||
|
||||
LOG_I(EMU,"Total number of UE %d (first local %d , num local %d, remote %d, relay %d) mobility %s \n",
|
||||
NB_UE_INST,oai_emulation.info.first_ue_local, oai_emulation.info.nb_ue_local,oai_emulation.info.nb_ue_remote,
|
||||
NB_RN_INST,
|
||||
oai_emulation.topology_config.mobility.UE_mobility.UE_mobility_type.selected_option);
|
||||
|
||||
LOG_I(EMU,"Total number of eNB %d (local %d, remote %d, relay %d) mobility %s \n",
|
||||
NB_eNB_INST,oai_emulation.info.nb_enb_local,oai_emulation.info.nb_enb_remote,
|
||||
NB_RN_INST,
|
||||
oai_emulation.topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option);
|
||||
|
||||
}
|
||||
|
||||
#ifdef OPENAIR2
|
||||
void init_omv(void)
|
||||
{
|
||||
if (oai_emulation.info.omv_enabled == 1) {
|
||||
|
||||
if(pipe(pfd) == -1)
|
||||
perror("pipe error \n");
|
||||
|
||||
snprintf( full_name, sizeof(full_name), "%s/UTIL/OMV/OMV",getenv("OPENAIR2_DIR") );
|
||||
LOG_I(EMU,"Stating the OMV path %s pfd[0] %d pfd[1] %d \n", full_name, pfd[0],pfd[1]);
|
||||
|
||||
switch(fork()) {
|
||||
case -1 :
|
||||
perror("fork failed \n");
|
||||
break;
|
||||
|
||||
case 0 : // child is going to be the omv, it is the reader
|
||||
if(close(pfd[1]) == -1 ) // we close the write desc.
|
||||
perror("close on write\n" );
|
||||
|
||||
sprintf(fdstr, "%d", pfd[0] );
|
||||
sprintf(num_enb, "%d", NB_eNB_INST);
|
||||
sprintf(num_ue, "%d", NB_UE_INST);
|
||||
sprintf(x_area, "%f", oai_emulation.topology_config.area.x_m );
|
||||
sprintf(y_area, "%f", oai_emulation.topology_config.area.y_m );
|
||||
sprintf(z_area, "%f", 200.0 );
|
||||
sprintf(frames, "%d", oai_emulation.info.n_frames);
|
||||
sprintf(nb_antenna, "%d", 4);
|
||||
sprintf(frame_type, "%s", (oai_emulation.info.frame_type[0] == 0) ? "FDD" : "TDD");
|
||||
sprintf(tdd_config, "%d", oai_emulation.info.tdd_config[0]);
|
||||
// execl is used to launch the visualisor
|
||||
execl(full_name,"OMV", fdstr, frames, num_enb, num_ue, x_area, y_area, z_area, nb_antenna, frame_type, tdd_config,NULL );
|
||||
perror( "error in execl the OMV" );
|
||||
}
|
||||
|
||||
//parent
|
||||
if(close( pfd[0] ) == -1 ) // we close the write desc.
|
||||
perror("close on read\n" );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void init_seed(uint8_t set_seed)
|
||||
{
|
||||
|
||||
@@ -1005,9 +923,9 @@ void init_seed(uint8_t set_seed)
|
||||
}
|
||||
|
||||
openair0_timestamp current_ru_rx_timestamp[NUMBER_OF_RU_MAX][MAX_NUM_CCs];
|
||||
openair0_timestamp current_UE_rx_timestamp[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
|
||||
openair0_timestamp current_UE_rx_timestamp[MAX_MOBILES_PER_ENB][MAX_NUM_CCs];
|
||||
openair0_timestamp last_ru_rx_timestamp[NUMBER_OF_RU_MAX][MAX_NUM_CCs];
|
||||
openair0_timestamp last_UE_rx_timestamp[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
|
||||
openair0_timestamp last_UE_rx_timestamp[MAX_MOBILES_PER_ENB][MAX_NUM_CCs];
|
||||
|
||||
int ru_trx_start(openair0_device *device) {
|
||||
return(0);
|
||||
@@ -1066,26 +984,27 @@ int ru_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **
|
||||
while (sample_count<nsamps) {
|
||||
while (current_ru_rx_timestamp[ru_id][CC_id]<
|
||||
(nsamps+last_ru_rx_timestamp[ru_id][CC_id])) {
|
||||
LOG_D(EMU,"RU: current TS %llu, last TS %llu, sleeping\n",current_ru_rx_timestamp[ru_id][CC_id],last_ru_rx_timestamp[ru_id][CC_id]);
|
||||
LOG_D(EMU,"RU: current TS %"PRIi64", last TS %"PRIi64", sleeping\n",current_ru_rx_timestamp[ru_id][CC_id],last_ru_rx_timestamp[ru_id][CC_id]);
|
||||
usleep(500);
|
||||
}
|
||||
|
||||
|
||||
subframe = (last_ru_rx_timestamp[ru_id][CC_id]/RC.ru[ru_id]->frame_parms.samples_per_tti)%10;
|
||||
LOG_D(EMU,"RU_trx_read generating UL subframe %d (Ts %llu, current TS %llu)\n",
|
||||
subframe,(unsigned long long)*ptimestamp,
|
||||
(unsigned long long)current_ru_rx_timestamp[ru_id][CC_id]);
|
||||
|
||||
do_UL_sig(UE2RU,
|
||||
enb_data,
|
||||
ue_data,
|
||||
subframe,
|
||||
0, // abstraction_flag
|
||||
&RC.ru[ru_id]->frame_parms,
|
||||
0, // frame is only used for abstraction
|
||||
ru_id,
|
||||
CC_id);
|
||||
|
||||
if (subframe_select(&RC.ru[ru_id]->frame_parms,subframe) != SF_DL || RC.ru[ru_id]->frame_parms.frame_type == FDD) {
|
||||
LOG_D(EMU,"RU_trx_read generating UL subframe %d (Ts %llu, current TS %llu)\n",
|
||||
subframe,(unsigned long long)*ptimestamp,
|
||||
(unsigned long long)current_ru_rx_timestamp[ru_id][CC_id]);
|
||||
|
||||
do_UL_sig(UE2RU,
|
||||
enb_data,
|
||||
ue_data,
|
||||
subframe,
|
||||
0, // abstraction_flag
|
||||
&RC.ru[ru_id]->frame_parms,
|
||||
0, // frame is only used for abstraction
|
||||
ru_id,
|
||||
CC_id);
|
||||
}
|
||||
last_ru_rx_timestamp[ru_id][CC_id] += RC.ru[ru_id]->frame_parms.samples_per_tti;
|
||||
sample_count += RC.ru[ru_id]->frame_parms.samples_per_tti;
|
||||
}
|
||||
@@ -1099,62 +1018,70 @@ int UE_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **
|
||||
int UE_id = device->Mod_id;
|
||||
int CC_id = device->CC_id;
|
||||
|
||||
int subframe,new_subframe;
|
||||
int subframe;
|
||||
int sample_count=0;
|
||||
int read_size;
|
||||
int sptti = PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti;
|
||||
|
||||
*ptimestamp = last_UE_rx_timestamp[UE_id][CC_id];
|
||||
|
||||
LOG_D(EMU,"[TXPATH]UE_trx_read nsamps %d TS %llu (%llu) antenna %d\n",nsamps,
|
||||
LOG_D(EMU,"UE %d DL simulation 0: UE_trx_read nsamps %d TS %llu (%llu, offset %d) antenna %d\n",
|
||||
UE_id,
|
||||
nsamps,
|
||||
(unsigned long long)current_UE_rx_timestamp[UE_id][CC_id],
|
||||
(unsigned long long)last_UE_rx_timestamp[UE_id][CC_id],
|
||||
(int)(last_UE_rx_timestamp[UE_id][CC_id]%sptti),
|
||||
cc);
|
||||
|
||||
|
||||
if (nsamps < PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti)
|
||||
if (nsamps < sptti)
|
||||
read_size = nsamps;
|
||||
else
|
||||
read_size = PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti;
|
||||
read_size = sptti;
|
||||
|
||||
while (sample_count<nsamps) {
|
||||
LOG_D(EMU,"UE %d: DL simulation 1: UE_trx_read : current TS now %"PRIi64", last TS %"PRIi64"\n",UE_id,current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
|
||||
while (current_UE_rx_timestamp[UE_id][CC_id] <
|
||||
(last_UE_rx_timestamp[UE_id][CC_id]+read_size)) {
|
||||
LOG_D(EMU,"[TXPATH]UE_trx_read : current TS %d, last TS %d, sleeping\n",current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
|
||||
LOG_D(EMU,"UE %d: DL simulation 2: UE_trx_read : current TS %"PRIi64", last TS %"PRIi64", sleeping\n",UE_id,current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
|
||||
usleep(500);
|
||||
}
|
||||
|
||||
// LOG_D(EMU,"UE_trx_read : current TS %d, last TS %d, sleeping\n",current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
|
||||
LOG_D(EMU,"UE %d: DL simulation 3: UE_trx_read : current TS now %"PRIi64", last TS %"PRIi64"\n",UE_id,current_UE_rx_timestamp[UE_id][CC_id],last_UE_rx_timestamp[UE_id][CC_id]);
|
||||
|
||||
// if we cross a subframe-boundary
|
||||
subframe = (last_UE_rx_timestamp[UE_id][CC_id]/PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti)%10;
|
||||
new_subframe = ((last_UE_rx_timestamp[UE_id][CC_id]+read_size)/PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti)%10;
|
||||
if (new_subframe!=subframe) {
|
||||
// tell top-level we are busy
|
||||
pthread_mutex_lock(&subframe_mutex);
|
||||
subframe_UE_mask|=(1<<UE_id);
|
||||
LOG_D(EMU,"Setting UE_id %d mask to busy (%d)\n",UE_id,subframe_UE_mask);
|
||||
pthread_mutex_unlock(&subframe_mutex);
|
||||
subframe = (last_UE_rx_timestamp[UE_id][CC_id]/sptti)%10;
|
||||
|
||||
}
|
||||
// tell top-level we are busy
|
||||
pthread_mutex_lock(&subframe_mutex);
|
||||
subframe_UE_mask|=(1<<UE_id);
|
||||
LOG_D(EMU,"Setting UE_id %d mask to busy (%d)\n",UE_id,subframe_UE_mask);
|
||||
pthread_mutex_unlock(&subframe_mutex);
|
||||
|
||||
|
||||
|
||||
LOG_D(PHY,"UE %d: DL simulation 4: UE_trx_read generating DL subframe %d (Ts %llu, current TS %llu,nsamps %d)\n",
|
||||
UE_id,subframe,(unsigned long long)*ptimestamp,
|
||||
(unsigned long long)current_UE_rx_timestamp[UE_id][CC_id],
|
||||
nsamps);
|
||||
|
||||
LOG_D(EMU,"UE %d: DL simulation 5: Doing DL simulation for %d samples starting in subframe %d at offset %d\n",
|
||||
UE_id,nsamps,subframe,
|
||||
(int)(last_UE_rx_timestamp[UE_id][CC_id]%sptti));
|
||||
|
||||
LOG_D(PHY,"UE_trx_read generating DL subframe %d (Ts %llu, current TS %llu)\n",
|
||||
subframe,(unsigned long long)*ptimestamp,
|
||||
(unsigned long long)current_UE_rx_timestamp[UE_id][CC_id]);
|
||||
do_DL_sig(RU2UE,
|
||||
enb_data,
|
||||
ue_data,
|
||||
subframe,
|
||||
last_UE_rx_timestamp[UE_id][CC_id]%PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti,
|
||||
nsamps,
|
||||
last_UE_rx_timestamp[UE_id][CC_id]%sptti,
|
||||
sptti,
|
||||
0, //abstraction_flag,
|
||||
&PHY_vars_UE_g[UE_id][CC_id]->frame_parms,
|
||||
UE_id,
|
||||
CC_id);
|
||||
|
||||
LOG_D(EMU,"[TXPATH]UE_trx_read @ TS %llu (%llu)=> frame %d, subframe %d\n",
|
||||
(unsigned long long)current_UE_rx_timestamp[UE_id][CC_id],
|
||||
(unsigned long long)last_UE_rx_timestamp[UE_id][CC_id],
|
||||
((unsigned long long)last_UE_rx_timestamp[UE_id][CC_id]/(PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti*10))&1023,
|
||||
LOG_D(EMU,"UE %d: DL simulation 6: UE_trx_read @ TS %"PRIi64" (%"PRIi64")=> frame %d, subframe %d\n",
|
||||
UE_id, current_UE_rx_timestamp[UE_id][CC_id],
|
||||
last_UE_rx_timestamp[UE_id][CC_id],
|
||||
(int)((last_UE_rx_timestamp[UE_id][CC_id]/(sptti*10))&1023),
|
||||
subframe);
|
||||
|
||||
last_UE_rx_timestamp[UE_id][CC_id] += read_size;
|
||||
@@ -1329,7 +1256,6 @@ void init_devices(void){
|
||||
PHY_vars_UE_g[UE_id][CC_id]->rfdevice.trx_set_freq_func = UE_trx_set_freq;
|
||||
PHY_vars_UE_g[UE_id][CC_id]->rfdevice.trx_set_gains_func = UE_trx_set_gains;
|
||||
last_UE_rx_timestamp[UE_id][CC_id] = 0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1342,64 +1268,20 @@ void init_ocm(void)
|
||||
|
||||
/* Added for PHY abstraction */
|
||||
|
||||
char* frame_type = "unknown";
|
||||
/* TODO: frame_type is unused, is it intended? */
|
||||
//char* frame_type = "unknown";
|
||||
LTE_DL_FRAME_PARMS *fp = &RC.ru[0]->frame_parms;
|
||||
|
||||
switch (fp->frame_type) {
|
||||
case FDD:
|
||||
frame_type = "FDD";
|
||||
break;
|
||||
|
||||
case TDD:
|
||||
frame_type = "TDD";
|
||||
break;
|
||||
}
|
||||
|
||||
if (abstraction_flag) {
|
||||
|
||||
get_beta_map();
|
||||
get_MIESM_param();
|
||||
|
||||
//load_pbch_desc();
|
||||
}
|
||||
|
||||
|
||||
for (ru_id = 0; ru_id < RC.nb_RU; ru_id++) {
|
||||
enb_data[ru_id] = (node_desc_t *)malloc(sizeof(node_desc_t));
|
||||
init_enb(enb_data[ru_id],oai_emulation.environment_system_config.antenna.eNB_antenna);
|
||||
}
|
||||
|
||||
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
|
||||
ue_data[UE_id] = (node_desc_t *)malloc(sizeof(node_desc_t));
|
||||
init_ue(ue_data[UE_id],oai_emulation.environment_system_config.antenna.UE_antenna);
|
||||
}
|
||||
|
||||
if ((oai_emulation.info.ocm_enabled == 1)&& (ethernet_flag == 0 ) &&
|
||||
(oai_emulation.environment_system_config.fading.shadowing.decorrelation_distance_m>0) &&
|
||||
(oai_emulation.environment_system_config.fading.shadowing.variance_dB>0)) {
|
||||
|
||||
// init SF map here!!!
|
||||
map1 =(int)oai_emulation.topology_config.area.x_m;
|
||||
map2 =(int)oai_emulation.topology_config.area.y_m;
|
||||
ShaF = init_SF(map1,map2,oai_emulation.environment_system_config.fading.shadowing.decorrelation_distance_m,oai_emulation.environment_system_config.fading.shadowing.variance_dB);
|
||||
|
||||
// size of area to generate shadow fading map
|
||||
LOG_D(EMU,"Simulation area x=%f, y=%f\n",
|
||||
oai_emulation.topology_config.area.x_m,
|
||||
oai_emulation.topology_config.area.y_m);
|
||||
}
|
||||
|
||||
if (abstraction_flag == 0)
|
||||
init_channel_vars (fp, &s_re, &s_im, &r_re, &r_im, &r_re0, &r_im0);
|
||||
init_channel_vars (fp, &s_re, &s_im, &r_re, &r_im, &r_re0, &r_im0);
|
||||
|
||||
// initialize channel descriptors
|
||||
LOG_I(PHY,"Initializing channel descriptors (nb_RU %d, nb_UE %d)\n",RC.nb_RU,NB_UE_INST);
|
||||
for (ru_id = 0; ru_id < RC.nb_RU; ru_id++) {
|
||||
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
LOG_D(OCM,"Initializing channel (%s, %d) from eNB %d to UE %d\n", oai_emulation.environment_system_config.fading.small_scale.selected_option,
|
||||
map_str_to_int(small_scale_names,oai_emulation.environment_system_config.fading.small_scale.selected_option), ru_id, UE_id);
|
||||
|
||||
|
||||
LOG_I(PHY,"Initializing channel descriptors (RU %d, UE %d) for N_RB_DL %d\n",ru_id,UE_id,
|
||||
RC.ru[ru_id]->frame_parms.N_RB_DL);
|
||||
RU2UE[ru_id][UE_id][CC_id] =
|
||||
new_channel_desc_scm(RC.ru[ru_id]->nb_tx,
|
||||
PHY_vars_UE_g[UE_id][CC_id]->frame_parms.nb_antennas_rx,
|
||||
@@ -1428,22 +1310,29 @@ void init_ocm(void)
|
||||
|
||||
// to make channel reciprocal uncomment following line instead of previous. However this only works for SISO at the moment. For MIMO the channel would need to be transposed.
|
||||
//UE2RU[UE_id][ru_id] = RU2UE[ru_id][UE_id];
|
||||
|
||||
AssertFatal(RU2UE[ru_id][UE_id][CC_id]!=NULL,"RU2UE[%d][%d][%d] is null\n",ru_id,UE_id,CC_id);
|
||||
AssertFatal(UE2RU[UE_id][ru_id][CC_id]!=NULL,"UE2RU[%d][%d][%d] is null\n",UE_id,ru_id,CC_id);
|
||||
//pathloss: -132.24 dBm/15kHz RE + target SNR - eNB TX power per RE
|
||||
if (ru_id == (UE_id % RC.nb_RU)) {
|
||||
RU2UE[ru_id][UE_id][CC_id]->path_loss_dB = -132.24 + snr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
|
||||
UE2RU[UE_id][ru_id][CC_id]->path_loss_dB = -132.24 + snr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
|
||||
} else {
|
||||
RU2UE[ru_id][UE_id][CC_id]->path_loss_dB = -132.24 + sinr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
|
||||
UE2RU[UE_id][ru_id][CC_id]->path_loss_dB = -132.24 + sinr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
|
||||
}
|
||||
|
||||
LOG_D(OCM,"Path loss from eNB %d to UE %d (CCid %d)=> %f dB (eNB TX %d, SNR %f)\n",ru_id,UE_id,CC_id,
|
||||
RU2UE[ru_id][UE_id][CC_id]->path_loss_dB,
|
||||
RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower,snr_dB);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void init_otg_pdcp_buffer(void)
|
||||
{
|
||||
module_id_t i;
|
||||
otg_pdcp_buffer = malloc((NB_UE_INST + NB_eNB_INST) * sizeof(Packet_OTG_List_t));
|
||||
|
||||
for (i = 0; i < NB_UE_INST + NB_eNB_INST; i++) {
|
||||
pkt_list_init(&(otg_pdcp_buffer[i]));
|
||||
//LOG_I(EMU,"HEAD of otg_pdcp_buffer[%d] is %p\n", i, pkt_list_get_head(&(otg_pdcp_buffer[i])));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void update_omg (frame_t frameP)
|
||||
{
|
||||
module_id_t UE_id, eNB_id;
|
||||
@@ -1489,7 +1378,7 @@ void update_ocm()
|
||||
|
||||
|
||||
|
||||
/* check if the openair channel model is activated used for PHY abstraction : path loss*/
|
||||
// check if the openair channel model is activated used for PHY abstraction : path loss
|
||||
if ((oai_emulation.info.ocm_enabled == 1)&& (ethernet_flag == 0 )) {
|
||||
|
||||
for (ru_id = 0; ru_id < RC.nb_RU; ru_id++)
|
||||
@@ -1501,15 +1390,12 @@ void update_ocm()
|
||||
//LOG_D(OMG," extracting position of eNb...\n");
|
||||
//display_node_list(enb_node_list);
|
||||
// display_node_list(ue_node_list);
|
||||
extract_position(enb_node_list, enb_data, RC.nb_RU);
|
||||
//extract_position(enb_node_list, enb_data, RC.nb_RU);
|
||||
//extract_position_fixed_enb(enb_data, NB_eNB_INST,frame);
|
||||
//LOG_D(OMG," extracting position of UE...\n");
|
||||
// if (oai_emulation.info.omg_model_ue == TRACE)
|
||||
extract_position(ue_node_list, ue_data, NB_UE_INST);
|
||||
//extract_position(ue_node_list, ue_data, NB_UE_INST);
|
||||
|
||||
/* if (frame % 50 == 0)
|
||||
LOG_N(OCM,"Path loss for TTI %d : \n", frame);
|
||||
*/
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
for (ru_id = 0; ru_id < RC.nb_RU; ru_id++) {
|
||||
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
|
||||
@@ -1524,10 +1410,10 @@ void update_ocm()
|
||||
//dx = enb_data[ru_id]->x - ue_data[UE_id]->x;
|
||||
//dy = enb_data[ru_id]->y - ue_data[UE_id]->y;
|
||||
//distance = sqrt(dx * dx + dy * dy);
|
||||
/*LOG_D(LOCALIZE, " OCM distance between eNB %d at (%f,%f) and UE %d at (%f,%f) is %f \n",
|
||||
ru_id, enb_data[ru_id]->x,enb_data[ru_id]->y,
|
||||
UE_id, ue_data[UE_id]->x,ue_data[UE_id]->y,
|
||||
distance);*/
|
||||
///LOG_D(LOCALIZE, " OCM distance between eNB %d at (%f,%f) and UE %d at (%f,%f) is %f \n",
|
||||
// ru_id, enb_data[ru_id]->x,enb_data[ru_id]->y,
|
||||
// UE_id, ue_data[UE_id]->x,ue_data[UE_id]->y,
|
||||
// distance);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1539,7 +1425,7 @@ void update_ocm()
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
|
||||
AssertFatal(RU2UE[ru_id][UE_id][CC_id]!=NULL,"RU2UE[%d][%d][%d] is null\n",ru_id,UE_id,CC_id);
|
||||
AssertFatal(UE2RU[ru_id][UE_id][CC_id]!=NULL,"RU2UE[%d][%d][%d] is null\n",ru_id,UE_id,CC_id);
|
||||
AssertFatal(UE2RU[UE_id][ru_id][CC_id]!=NULL,"UE2RU[%d][%d][%d] is null\n",UE_id,ru_id,CC_id);
|
||||
//pathloss: -132.24 dBm/15kHz RE + target SNR - eNB TX power per RE
|
||||
if (ru_id == (UE_id % RC.nb_RU)) {
|
||||
RU2UE[ru_id][UE_id][CC_id]->path_loss_dB = -132.24 + snr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
|
||||
@@ -1559,15 +1445,128 @@ void update_ocm()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef OPENAIR2
|
||||
void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
|
||||
{
|
||||
|
||||
#if defined(USER_MODE) && defined(OAI_EMU)
|
||||
|
||||
//int rrc_state=0;
|
||||
if (oai_emulation.info.otg_enabled ==1 ) {
|
||||
|
||||
int dst_id, app_id;
|
||||
Packet_otg_elt_t *otg_pkt;
|
||||
|
||||
for (dst_id = 0; dst_id < MAX_MOBILES_PER_ENB; dst_id++) {
|
||||
for_times += 1;
|
||||
|
||||
// generate traffic if the ue is rrc reconfigured state
|
||||
//if ((rrc_state=mac_eNB_get_rrc_status(enb_module_idP, dst_id)) > 2 //RRC_CONNECTED
|
||||
{
|
||||
if (mac_eNB_get_rrc_status(enb_module_idP, oai_emulation.info.eNB_ue_module_id_to_rnti[enb_module_idP][dst_id]) > 2 ){
|
||||
if_times += 1;
|
||||
|
||||
for (app_id=0; app_id<MAX_NUM_APPLICATION; app_id++) {
|
||||
otg_pkt = malloc (sizeof(Packet_otg_elt_t));
|
||||
|
||||
(otg_pkt->otg_pkt).sdu_buffer = (uint8_t*) packet_gen(enb_module_idP, dst_id + NB_eNB_INST, app_id, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size));
|
||||
|
||||
if ((otg_pkt->otg_pkt).sdu_buffer != NULL) {
|
||||
otg_times += 1;
|
||||
(otg_pkt->otg_pkt).rb_id = DTCH-2; // app could be binded to a given DRB
|
||||
(otg_pkt->otg_pkt).module_id = enb_module_idP;
|
||||
(otg_pkt->otg_pkt).dst_id = dst_id;
|
||||
(otg_pkt->otg_pkt).is_ue = 0;
|
||||
(otg_pkt->otg_pkt).mode = PDCP_TRANSMISSION_MODE_DATA;
|
||||
//Adding the packet to the OTG-PDCP buffer
|
||||
pkt_list_add_tail_eurecom(otg_pkt, &(otg_pdcp_buffer[enb_module_idP]));
|
||||
LOG_D(EMU,"[eNB %d] ADD pkt to OTG buffer with size %d for dst %d on rb_id %d for app id %d \n",
|
||||
(otg_pkt->otg_pkt).module_id, otg_pkt->otg_pkt.sdu_buffer_size, (otg_pkt->otg_pkt).dst_id,(otg_pkt->otg_pkt).rb_id, app_id);
|
||||
} else {
|
||||
free(otg_pkt);
|
||||
otg_pkt=NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
mbms_service_id_t service_id;
|
||||
mbms_session_id_t session_id;
|
||||
rb_id_t rb_id;
|
||||
|
||||
// MBSM multicast traffic
|
||||
if (ctime >= 500 ) {// only generate when UE can receive MTCH (need to control this value)
|
||||
for (service_id = 0; service_id < 2 ; service_id++) { //maxServiceCount
|
||||
for (session_id = 0; session_id < 2; session_id++) { // maxSessionPerPMCH
|
||||
if (pdcp_mbms_array_eNB[enb_module_idP][service_id][session_id].instanciated_instance == TRUE) { // this service/session is configured
|
||||
|
||||
otg_pkt = malloc (sizeof(Packet_otg_elt_t));
|
||||
// LOG_T(OTG,"multicast packet gen for (service/mch %d, session/lcid %d, rb_id %d)\n", service_id, session_id, service_id*maxSessionPerPMCH + session_id);
|
||||
rb_id = pdcp_mbms_array_eNB[enb_module_idP][service_id][session_id].rb_id;
|
||||
(otg_pkt->otg_pkt).sdu_buffer = (uint8_t*) packet_gen_multicast(enb_module_idP, session_id, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size));
|
||||
|
||||
if ((otg_pkt->otg_pkt).sdu_buffer != NULL) {
|
||||
(otg_pkt->otg_pkt).rb_id = rb_id;
|
||||
(otg_pkt->otg_pkt).module_id = enb_module_idP;
|
||||
(otg_pkt->otg_pkt).dst_id = session_id;
|
||||
(otg_pkt->otg_pkt).is_ue = FALSE;
|
||||
//Adding the packet to the OTG-PDCP buffer
|
||||
(otg_pkt->otg_pkt).mode = PDCP_TRANSMISSION_MODE_TRANSPARENT;
|
||||
pkt_list_add_tail_eurecom(otg_pkt, &(otg_pdcp_buffer[enb_module_idP]));
|
||||
LOG_D(EMU, "[eNB %d] ADD packet (%p) multicast to OTG buffer for dst %d on rb_id %d\n",
|
||||
(otg_pkt->otg_pkt).module_id, otg_pkt, (otg_pkt->otg_pkt).dst_id,(otg_pkt->otg_pkt).rb_id);
|
||||
} else {
|
||||
//LOG_I(EMU, "OTG returns null \n");
|
||||
free(otg_pkt);
|
||||
otg_pkt=NULL;
|
||||
}
|
||||
|
||||
|
||||
// old version
|
||||
// MBSM multicast traffic
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
if (frame >= 46) {// only generate when UE can receive MTCH (need to control this value)
|
||||
for (service_id = 0; service_id < 2 ; service_id++) { //maxServiceCount
|
||||
for (session_id = 0; session_id < 2; session_id++) { // maxSessionPerPMCH
|
||||
// LOG_I(OTG,"DUY:frame %d, pdcp_mbms_array[module_id][rb_id].instanciated_instance is %d\n",frame,pdcp_mbms_array[module_id][service_id*maxSessionPerPMCH + session_id].instanciated_instance);
|
||||
if ((pdcp_mbms_array[module_idP][service_id*maxSessionPerPMCH + session_id].instanciated_instance== module_idP + 1) && (eNB_flag == 1)){ // this service/session is configured
|
||||
// LOG_T(OTG,"multicast packet gen for (service/mch %d, session/lcid %d)\n", service_id, session_id);
|
||||
// Duy add
|
||||
LOG_I(OTG, "frame %d, multicast packet gen for (service/mch %d, session/lcid %d, rb_id %d)\n",frame, service_id, session_id,service_id*maxSessionPerPMCH + session_id);
|
||||
// end Duy add
|
||||
rb_id = pdcp_mbms_array[module_id][service_id*maxSessionPerPMCH + session_id].rb_id;
|
||||
otg_pkt=(uint8_t*) packet_gen_multicast(module_idP, session_id, ctime, &pkt_size);
|
||||
if (otg_pkt != NULL) {
|
||||
LOG_D(OTG,"[eNB %d] sending a multicast packet from module %d on rab id %d (src %d, dst %d) pkt size %d\n", eNB_index, module_idP, rb_id, module_idP, session_id, pkt_size);
|
||||
pdcp_data_req(module_id, frame, eNB_flag, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, pkt_size, otg_pkt,PDCP_TM);
|
||||
free(otg_pkt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // end multicast traffic
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // end multicast traffic
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
#if 0 // defined(EXMIMO) || defined(OAI_USRP)
|
||||
if (otg_enabled==1) {
|
||||
ctime = frame * 100;
|
||||
|
||||
for (dst_id = 0; dst_id < NUMBER_OF_UE_MAX; dst_id++) {
|
||||
for (dst_id = 0; dst_id < MAX_MOBILES_PER_ENB; dst_id++) {
|
||||
if (mac_get_rrc_status(eNB_index, eNB_flag, dst_id ) > 2) {
|
||||
otg_pkt = malloc (sizeof(Packet_otg_elt_t));
|
||||
(otg_pkt->otg_pkt).sdu_buffer = packet_gen(module_instP, dst_id, ctime, &pkt_size);
|
||||
@@ -1596,6 +1595,7 @@ void update_otg_UE(module_id_t ue_mod_idP, unsigned int ctime)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
int init_slot_isr(void)
|
||||
{
|
||||
@@ -1664,6 +1664,13 @@ void init_time()
|
||||
td_avg = TARGET_SF_TIME_NS;
|
||||
}
|
||||
|
||||
// dummy function
|
||||
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind) {
|
||||
|
||||
return(0);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
int openair0_transport_load(openair0_device *device, openair0_config_t *openair0_cfg, eth_params_t * eth_params) {
|
||||
|
||||
|
||||
@@ -27,27 +27,26 @@
|
||||
#include <time.h>
|
||||
#include <cblas.h>
|
||||
|
||||
#include "SIMULATION/TOOLS/defs.h"
|
||||
#include "SIMULATION/RF/defs.h"
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "SIMULATION/RF/rf.h"
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/extern.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/defs_UE.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "oaisim_config.h"
|
||||
|
||||
#ifdef OPENAIR2
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_extern.h"
|
||||
#include "UTIL/LOG/log_if.h"
|
||||
#include "UTIL/LOG/log_extern.h"
|
||||
#include "RRC/LITE/extern.h"
|
||||
#include "PHY_INTERFACE/extern.h"
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "PHY_INTERFACE/phy_interface_extern.h"
|
||||
#include "UTIL/OCG/OCG.h"
|
||||
#include "UTIL/OMG/omg.h"
|
||||
#include "UTIL/OPT/opt.h" // to test OPT
|
||||
#endif
|
||||
|
||||
#include "SCHED/defs.h"
|
||||
#include "SCHED/extern.h"
|
||||
|
||||
#include "oaisim.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user