Merge branch 'develop' into ulSNRs
Conflicts: openair2/ENB_APP/enb_config.c openair2/LAYER2/MAC/eNB_scheduler.c openair2/LAYER2/MAC/mac.h
This commit is contained in:
@@ -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,7 +36,7 @@
|
||||
# include "lteRALue.h"
|
||||
# include "lteRALenb.h"
|
||||
# endif
|
||||
# include "RRC/LITE/defs.h"
|
||||
# include "RRC/LTE/rrc_defs.h"
|
||||
# endif
|
||||
# include "enb_app.h"
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
# include "lteRALue.h"
|
||||
# include "lteRALenb.h"
|
||||
# endif
|
||||
# include "RRC/LITE/defs.h"
|
||||
# include "RRC/LTE/rrc_defs.h"
|
||||
# endif
|
||||
# include "enb_app.h"
|
||||
|
||||
|
||||
@@ -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,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";
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
+59
-39
@@ -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"
|
||||
@@ -121,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;
|
||||
|
||||
@@ -151,7 +150,7 @@ 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;
|
||||
@@ -213,14 +212,14 @@ 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
|
||||
}
|
||||
|
||||
// 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 );
|
||||
|
||||
@@ -246,10 +245,9 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
||||
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, no_relay, NULL, 1);
|
||||
phy_procedures_eNB_TX(eNB, proc, 1);
|
||||
}
|
||||
|
||||
|
||||
stop_meas( &softmodem_stats_rxtx_sf );
|
||||
|
||||
LOG_D(PHY,"%s() Exit proc[rx:%d%d tx:%d%d]\n", __FUNCTION__, proc->frame_rx, proc->subframe_rx, proc->frame_tx, proc->subframe_tx);
|
||||
@@ -327,7 +325,7 @@ static void* tx_thread(void* param) {
|
||||
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, no_relay, NULL, 1);
|
||||
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 );
|
||||
@@ -353,8 +351,19 @@ static void* tx_thread(void* param) {
|
||||
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 = &eNB_proc->proc_rxtx[0];
|
||||
//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];
|
||||
}
|
||||
|
||||
|
||||
PHY_VARS_eNB *eNB = RC.eNB[0][proc->CC_id];
|
||||
//RU_proc_t *ru_proc = NULL;
|
||||
|
||||
@@ -410,7 +419,7 @@ static void* eNB_thread_rxtx( void* param ) {
|
||||
if(get_nprocs() >= 8) wakeup_tx(eNB,eNB->proc.ru_proc);
|
||||
else
|
||||
{
|
||||
phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1);
|
||||
phy_procedures_eNB_TX(eNB, proc, 1);
|
||||
wakeup_txfh(proc,eNB->proc.ru_proc);
|
||||
}
|
||||
|
||||
@@ -476,6 +485,8 @@ void eNB_top(PHY_VARS_eNB *eNB, int frame_rx, int subframe_rx, char *string,RU_t
|
||||
|
||||
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;
|
||||
@@ -705,7 +716,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;
|
||||
@@ -794,7 +805,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
|
||||
);
|
||||
@@ -808,7 +819,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.
|
||||
@@ -891,7 +902,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;
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
pthread_attr_t *attr_prach_br=NULL;
|
||||
#endif
|
||||
|
||||
@@ -937,7 +948,7 @@ void init_eNB_proc(int inst) {
|
||||
pthread_attr_init( &proc->attr_asynch_rxtx);
|
||||
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);
|
||||
@@ -949,7 +960,7 @@ 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
|
||||
|
||||
@@ -963,8 +974,17 @@ void init_eNB_proc(int inst) {
|
||||
init_td_thread(eNB);
|
||||
}
|
||||
//////////////////////////////////////need to modified////////////////*****
|
||||
pthread_create( &proc_rxtx[0].pthread_rxtx, attr0, eNB_thread_rxtx, proc );
|
||||
pthread_create( &proc_rxtx[1].pthread_rxtx, attr1, tx_thread, proc);
|
||||
//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);
|
||||
|
||||
@@ -973,7 +993,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];
|
||||
@@ -1057,7 +1077,7 @@ void kill_eNB_proc(int inst) {
|
||||
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 );
|
||||
@@ -1207,7 +1227,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*));
|
||||
@@ -1230,7 +1250,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
|
||||
@@ -1283,7 +1303,7 @@ void init_eNB_afterRU(void) {
|
||||
|
||||
RC.ru[ru_id]->wakeup_rxtx = wakeup_rxtx;
|
||||
RC.ru[ru_id]->wakeup_prach_eNB = wakeup_prach_eNB;
|
||||
#ifdef Rel14
|
||||
#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;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+27
-30
@@ -60,7 +60,7 @@
|
||||
|
||||
#include "PHY/types.h"
|
||||
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/defs_common.h"
|
||||
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
|
||||
|
||||
@@ -70,22 +70,19 @@
|
||||
#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 "LAYER2/MAC/mac_extern.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_proto.h"
|
||||
#include "SCHED/sched_eNB.h"
|
||||
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
#include "../../SIMU/USER/init_lte.h"
|
||||
#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 "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#include "LAYER2/MAC/proto.h"
|
||||
#include "RRC/LITE/extern.h"
|
||||
#include "PHY_INTERFACE/extern.h"
|
||||
|
||||
#ifdef SMBV
|
||||
#include "PHY/TOOLS/smbv.h"
|
||||
unsigned short config_frames[4] = {2,9,11,13};
|
||||
#endif
|
||||
#include "UTIL/LOG/log_extern.h"
|
||||
#include "UTIL/OTG/otg_tx.h"
|
||||
#include "UTIL/OTG/otg_externs.h"
|
||||
@@ -527,7 +524,7 @@ void fh_if4p5_south_asynch_in(RU_t *ru,int *frame,int *subframe) {
|
||||
}
|
||||
if (packet_type == IF4p5_PULFFT) symbol_mask &= (~(1<<symbol_number));
|
||||
else if (packet_type == IF4p5_PRACH) prach_rx &= (~0x1);
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
else if (packet_type == IF4p5_PRACH_BR_CE0) prach_rx &= (~0x2);
|
||||
else if (packet_type == IF4p5_PRACH_BR_CE1) prach_rx &= (~0x4);
|
||||
else if (packet_type == IF4p5_PRACH_BR_CE2) prach_rx &= (~0x8);
|
||||
@@ -1010,7 +1007,7 @@ static void* ru_thread_prach( void* param ) {
|
||||
if (ru->eNB_list[0]){
|
||||
prach_procedures(
|
||||
ru->eNB_list[0]
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0
|
||||
#endif
|
||||
);
|
||||
@@ -1023,7 +1020,7 @@ static void* ru_thread_prach( void* param ) {
|
||||
NULL,
|
||||
proc->frame_prach,
|
||||
0
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0
|
||||
#endif
|
||||
);
|
||||
@@ -1038,7 +1035,7 @@ static void* ru_thread_prach( void* param ) {
|
||||
return &ru_thread_prach_status;
|
||||
}
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
static void* ru_thread_prach_br( void* param ) {
|
||||
|
||||
static int ru_thread_prach_status;
|
||||
@@ -1237,7 +1234,7 @@ static inline int wakeup_prach_ru(RU_t *ru) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
static inline int wakeup_prach_ru_br(RU_t *ru) {
|
||||
|
||||
struct timespec wait;
|
||||
@@ -1627,7 +1624,7 @@ static void* ru_thread( void* param ) {
|
||||
if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)==1)) {
|
||||
wakeup_prach_ru(ru);
|
||||
}
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
else if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)>1)) {
|
||||
wakeup_prach_ru_br(ru);
|
||||
}
|
||||
@@ -1785,7 +1782,7 @@ void init_RU_proc(RU_t *ru) {
|
||||
RU_proc_t *proc;
|
||||
pthread_attr_t *attr_FH=NULL,*attr_FH1=NULL,*attr_prach=NULL,*attr_asynch=NULL,*attr_synch=NULL,*attr_emulateRF=NULL;
|
||||
//pthread_attr_t *attr_fep=NULL;
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
pthread_attr_t *attr_prach_br=NULL;
|
||||
#endif
|
||||
char name[100];
|
||||
@@ -1838,7 +1835,7 @@ void init_RU_proc(RU_t *ru) {
|
||||
pthread_attr_init( &proc->attr_asynch_rxtx);
|
||||
pthread_attr_init( &proc->attr_fep);
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
proc->instance_cnt_prach_br = -1;
|
||||
pthread_mutex_init( &proc->mutex_prach_br, NULL);
|
||||
pthread_cond_init( &proc->cond_prach_br, NULL);
|
||||
@@ -1852,7 +1849,7 @@ void init_RU_proc(RU_t *ru) {
|
||||
attr_synch = &proc->attr_synch;
|
||||
attr_asynch = &proc->attr_asynch_rxtx;
|
||||
attr_emulateRF = &proc->attr_emulateRF;
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
attr_prach_br = &proc->attr_prach_br;
|
||||
#endif
|
||||
#endif
|
||||
@@ -1866,7 +1863,7 @@ void init_RU_proc(RU_t *ru) {
|
||||
|
||||
if (ru->function == NGFI_RRU_IF4p5) {
|
||||
pthread_create( &proc->pthread_prach, attr_prach, ru_thread_prach, (void*)ru );
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
pthread_create( &proc->pthread_prach_br, attr_prach_br, ru_thread_prach_br, (void*)ru );
|
||||
#endif
|
||||
if (ru->is_slave == 1) pthread_create( &proc->pthread_synch, attr_synch, ru_thread_synch, (void*)ru);
|
||||
@@ -1916,7 +1913,7 @@ void kill_RU_proc(int inst)
|
||||
pthread_cond_signal(&proc->cond_prach);
|
||||
pthread_mutex_unlock(&proc->mutex_prach);
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
pthread_mutex_lock(&proc->mutex_prach_br);
|
||||
proc->instance_cnt_prach_br = 0;
|
||||
pthread_cond_signal(&proc->cond_prach_br);
|
||||
@@ -1946,7 +1943,7 @@ void kill_RU_proc(int inst)
|
||||
if (ru->function == NGFI_RRU_IF4p5) {
|
||||
LOG_D(PHY, "Joining pthread_prach\n");
|
||||
pthread_join(proc->pthread_prach, NULL);
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LOG_D(PHY, "Joining pthread_prach_br\n");
|
||||
pthread_join(proc->pthread_prach_br, NULL);
|
||||
#endif
|
||||
@@ -2010,7 +2007,7 @@ void kill_RU_proc(int inst)
|
||||
pthread_attr_destroy(&proc->attr_asynch_rxtx);
|
||||
pthread_attr_destroy(&proc->attr_fep);
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
pthread_mutex_destroy(&proc->mutex_prach_br);
|
||||
pthread_cond_destroy(&proc->cond_prach_br);
|
||||
pthread_attr_destroy(&proc->attr_prach_br);
|
||||
@@ -2106,7 +2103,7 @@ void configure_ru(int idx,
|
||||
LOG_I(PHY,"REMOTE_IF4p5: prach_FrequOffset %d, prach_ConfigIndex %d\n",
|
||||
config->prach_FreqOffset[0],config->prach_ConfigIndex[0]);
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int i;
|
||||
for (i=0;i<4;i++) {
|
||||
config->emtc_prach_CElevel_enable[0][i] = ru->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i];
|
||||
@@ -2150,7 +2147,7 @@ void configure_rru(int idx,
|
||||
config->prach_FreqOffset[0],config->prach_ConfigIndex[0],ru->att_tx,ru->att_rx);
|
||||
ru->frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset = config->prach_FreqOffset[0];
|
||||
ru->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex = config->prach_ConfigIndex[0];
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
for (int i=0;i<4;i++) {
|
||||
ru->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i] = config->emtc_prach_CElevel_enable[0][i];
|
||||
ru->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[i] = config->emtc_prach_FreqOffset[0][i];
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
#include "PHY/types.h"
|
||||
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
@@ -59,17 +59,14 @@
|
||||
|
||||
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
|
||||
#include "PHY/vars.h"
|
||||
#include "SCHED/vars.h"
|
||||
#include "LAYER2/MAC/vars.h"
|
||||
#include "PHY/phy_vars.h"
|
||||
#include "SCHED/sched_common_vars.h"
|
||||
#include "LAYER2/MAC/mac_vars.h"
|
||||
|
||||
#include "../../SIMU/USER/init_lte.h"
|
||||
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/vars.h"
|
||||
#include "LAYER2/MAC/proto.h"
|
||||
#include "RRC/LITE/vars.h"
|
||||
#include "PHY_INTERFACE/vars.h"
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "RRC/LTE/rrc_vars.h"
|
||||
#include "PHY_INTERFACE/phy_interface_vars.h"
|
||||
|
||||
#ifdef SMBV
|
||||
#include "PHY/TOOLS/smbv.h"
|
||||
@@ -93,6 +90,8 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#include "create_tasks.h"
|
||||
#endif
|
||||
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
#include "system.h"
|
||||
|
||||
#ifdef XFORMS
|
||||
@@ -118,6 +117,8 @@ int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
|
||||
|
||||
uint8_t nfapi_mode = 0; // Default to monolithic mode
|
||||
|
||||
uint16_t sf_ahead=4;
|
||||
|
||||
pthread_cond_t sync_cond;
|
||||
pthread_mutex_t sync_mutex;
|
||||
int sync_var=-1; //!< protected by mutex \ref sync_mutex.
|
||||
@@ -143,7 +144,8 @@ static int8_t threequarter_fs=0;
|
||||
uint32_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
|
||||
|
||||
// This is a dummy declaration (dlsch_demodulation.c is no longer compiled for eNodeB)
|
||||
int16_t dlsch_demod_shift = 0;
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
static char *itti_dump_file = NULL;
|
||||
@@ -1094,7 +1096,7 @@ int main( int argc, char **argv )
|
||||
|
||||
// init UE_PF_PO and mutex lock
|
||||
pthread_mutex_init(&ue_pf_po_mutex, NULL);
|
||||
memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*NUMBER_OF_UE_MAX*MAX_NUM_CCs);
|
||||
memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*MAX_MOBILES_PER_ENB*MAX_NUM_CCs);
|
||||
|
||||
mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||
|
||||
@@ -1149,6 +1151,13 @@ int main( int argc, char **argv )
|
||||
pthread_mutex_init(&sync_mutex, NULL);
|
||||
}
|
||||
|
||||
if (nfapi_mode)
|
||||
{
|
||||
printf("NFAPI*** - mutex and cond created - will block shortly for completion of PNF connection\n");
|
||||
pthread_cond_init(&sync_cond,NULL);
|
||||
pthread_mutex_init(&sync_mutex, NULL);
|
||||
}
|
||||
|
||||
const char *nfapi_mode_str = "<UNKNOWN>";
|
||||
|
||||
switch(nfapi_mode) {
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
#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"
|
||||
@@ -74,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"
|
||||
@@ -135,17 +138,21 @@
|
||||
{"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}, \
|
||||
{"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)},\
|
||||
{"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}, \
|
||||
@@ -178,7 +185,7 @@ extern int16_t dlsch_demod_shift;
|
||||
{"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} \
|
||||
{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, iptr:&nonbiotflag, defintval:0, TYPE_INT, 0} \
|
||||
}
|
||||
|
||||
#define CONFIG_HLP_FLOG "Enable online log \n"
|
||||
|
||||
+1806
-537
File diff suppressed because it is too large
Load Diff
@@ -47,7 +47,7 @@
|
||||
|
||||
#include "PHY/types.h"
|
||||
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/defs_UE.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
@@ -59,22 +59,18 @@
|
||||
|
||||
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
|
||||
#include "PHY/vars.h"
|
||||
#include "SCHED/vars.h"
|
||||
#include "LAYER2/MAC/vars.h"
|
||||
|
||||
#include "PHY/phy_vars_ue.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_vars.h"
|
||||
#include "SCHED/sched_common_vars.h"
|
||||
#include "PHY/MODULATION/modulation_vars.h"
|
||||
#include "../../SIMU/USER/init_lte.h"
|
||||
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/vars.h"
|
||||
#include "LAYER2/MAC/proto.h"
|
||||
#include "RRC/LITE/vars.h"
|
||||
#include "PHY_INTERFACE/vars.h"
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_vars.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "RRC/LTE/rrc_vars.h"
|
||||
#include "PHY_INTERFACE/phy_interface_vars.h"
|
||||
|
||||
#ifdef SMBV
|
||||
#include "PHY/TOOLS/smbv.h"
|
||||
unsigned short config_frames[4] = {2,9,11,13};
|
||||
#endif
|
||||
#include "UTIL/LOG/log_extern.h"
|
||||
#include "UTIL/OTG/otg_tx.h"
|
||||
#include "UTIL/OTG/otg_externs.h"
|
||||
@@ -101,6 +97,8 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#endif
|
||||
#include "lte-softmodem.h"
|
||||
|
||||
RAN_CONTEXT_t RC;
|
||||
|
||||
/* temporary compilation wokaround (UE/eNB split */
|
||||
uint16_t sf_ahead;
|
||||
#ifdef XFORMS
|
||||
@@ -114,6 +112,17 @@ unsigned char scope_enb_num_ue = 2;
|
||||
static pthread_t forms_thread; //xforms
|
||||
#endif //XFORMS
|
||||
|
||||
pthread_cond_t nfapi_sync_cond;
|
||||
pthread_mutex_t nfapi_sync_mutex;
|
||||
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
|
||||
|
||||
uint8_t nfapi_mode = 0;
|
||||
|
||||
uint16_t sf_ahead=2;
|
||||
|
||||
char *emul_iface;
|
||||
|
||||
|
||||
pthread_cond_t sync_cond;
|
||||
pthread_mutex_t sync_mutex;
|
||||
int sync_var=-1; //!< protected by mutex \ref sync_mutex.
|
||||
@@ -205,6 +214,7 @@ uint64_t num_missed_slots=0; // counter for the number of missed slots
|
||||
|
||||
extern void reset_opp_meas(void);
|
||||
extern void print_opp_meas(void);
|
||||
extern void init_UE_stub_single_thread(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_iface);
|
||||
|
||||
extern PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t UE_id,
|
||||
@@ -386,7 +396,7 @@ static void *scope_thread(void *arg) {
|
||||
#endif
|
||||
|
||||
while (!oai_exit) {
|
||||
dump_ue_stats (PHY_vars_UE_g[0][0], &PHY_vars_UE_g[0][0]->proc.proc_rxtx[0],stats_buffer, 0, mode,rx_input_level_dBm);
|
||||
// dump_ue_stats (PHY_vars_UE_g[0][0], &PHY_vars_UE_g[0][0]->proc.proc_rxtx[0],stats_buffer, 0, mode,rx_input_level_dBm);
|
||||
//fl_set_object_label(form_stats->stats_text, stats_buffer);
|
||||
fl_clear_browser(form_stats->stats_text);
|
||||
fl_add_browser_line(form_stats->stats_text, stats_buffer);
|
||||
@@ -458,6 +468,7 @@ void *l2l1_task(void *arg) {
|
||||
}
|
||||
#endif
|
||||
|
||||
extern int16_t dlsch_demod_shift;
|
||||
|
||||
static void get_options(void) {
|
||||
int CC_id;
|
||||
@@ -576,7 +587,8 @@ static void get_options(void) {
|
||||
// Read it in and store in asn1c data structures
|
||||
sprintf(uecap_xer,"%stargets/PROJECTS/GENERIC-LTE-EPC/CONF/UE_config.xml",getenv("OPENAIR_HOME"));
|
||||
printf("%s\n",uecap_xer);
|
||||
uecap_xer_in=1;
|
||||
if(nfapi_mode!=3)
|
||||
uecap_xer_in=1;
|
||||
} /* UE with config file */
|
||||
}
|
||||
|
||||
@@ -742,6 +754,32 @@ void terminate_task(task_id_t task_id, module_id_t mod_id)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
static inline void wait_nfapi_init(char *thread_name) {
|
||||
|
||||
printf( "waiting for NFAPI PNF connection and population of global structure (%s)\n",thread_name);
|
||||
pthread_mutex_lock( &nfapi_sync_mutex );
|
||||
|
||||
while (nfapi_sync_var<0)
|
||||
pthread_cond_wait( &nfapi_sync_cond, &nfapi_sync_mutex );
|
||||
|
||||
pthread_mutex_unlock(&nfapi_sync_mutex);
|
||||
|
||||
printf( "NFAPI: got sync (%s)\n", thread_name);
|
||||
}
|
||||
|
||||
int stop_L1L2(module_id_t enb_id)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int restart_L1L2(module_id_t enb_id)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
int i;
|
||||
@@ -753,6 +791,10 @@ int main( int argc, char **argv )
|
||||
uint8_t abstraction_flag=0;
|
||||
uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2;
|
||||
|
||||
// Default value for the number of UEs. It will hold,
|
||||
// if not changed from the command line option --num-ues
|
||||
NB_UE_INST=1;
|
||||
|
||||
#if defined (XFORMS)
|
||||
int ret;
|
||||
#endif
|
||||
@@ -780,7 +822,21 @@ int main( int argc, char **argv )
|
||||
|
||||
printf("Reading in command-line options\n");
|
||||
|
||||
get_options ();
|
||||
get_options ();
|
||||
|
||||
printf("NFAPI_MODE value: %d \n", nfapi_mode);
|
||||
|
||||
// Panos: Not sure if the following is needed here
|
||||
/*if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
|
||||
if (UE_flag == 0) {
|
||||
fprintf(stderr,"Getting configuration failed\n");
|
||||
exit(-1);
|
||||
}
|
||||
else {
|
||||
printf("Setting nfapi mode to UE_STUB_OFFNET\n");
|
||||
nfapi_mode = 4;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
#if T_TRACER
|
||||
@@ -846,6 +902,14 @@ int main( int argc, char **argv )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//TTN for D2D
|
||||
#ifdef Rel14
|
||||
printf ("RRC control socket\n");
|
||||
rrc_control_socket_init();
|
||||
printf ("PDCP PC5S socket\n");
|
||||
pdcp_pc5_socket_init();
|
||||
#endif
|
||||
|
||||
#if !defined(ENABLE_ITTI)
|
||||
// to make a graceful exit when ctrl-c is pressed
|
||||
signal(SIGSEGV, signal_handler);
|
||||
@@ -872,20 +936,66 @@ int main( int argc, char **argv )
|
||||
|
||||
printf("Before CC \n");
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
NB_UE_INST=1;
|
||||
NB_INST=1;
|
||||
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_UE**));
|
||||
PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_UE*)*MAX_NUM_CCs);
|
||||
|
||||
|
||||
// Panos: From old version
|
||||
/*if (UE_flag==1) {
|
||||
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_UE**)*NB_UE_INST);
|
||||
for (int i=0; i<NB_UE_INST; i++) {
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
|
||||
PHY_vars_UE_g[i] = malloc(sizeof(PHY_VARS_UE*)*MAX_NUM_CCs);
|
||||
PHY_vars_UE_g[i][CC_id] = init_ue_vars(frame_parms[CC_id], i,abstraction_flag);
|
||||
|
||||
UE[CC_id] = PHY_vars_UE_g[i][CC_id];
|
||||
printf("PHY_vars_UE_g[inst][%d] = %p\n",CC_id,UE[CC_id]);
|
||||
|
||||
if (phy_test==1)
|
||||
UE[CC_id]->mac_enabled = 0;
|
||||
else
|
||||
UE[CC_id]->mac_enabled = 1;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
//NB_UE_INST=1;
|
||||
NB_INST=1;
|
||||
if(nfapi_mode == 3){
|
||||
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_UE**)*NB_UE_INST);
|
||||
for (int i=0; i<NB_UE_INST; i++) {
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
PHY_vars_UE_g[i] = malloc(sizeof(PHY_VARS_UE*)*MAX_NUM_CCs);
|
||||
PHY_vars_UE_g[i][CC_id] = init_ue_vars(frame_parms[CC_id], i,abstraction_flag);
|
||||
|
||||
UE[CC_id] = PHY_vars_UE_g[i][CC_id];
|
||||
printf("PHY_vars_UE_g[inst][%d] = %p\n",CC_id,UE[CC_id]);
|
||||
|
||||
if (phy_test==1)
|
||||
UE[CC_id]->mac_enabled = 0;
|
||||
else
|
||||
UE[CC_id]->mac_enabled = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
//NB_UE_INST=1;
|
||||
NB_INST=1;
|
||||
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_UE**));
|
||||
PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_UE*)*MAX_NUM_CCs);
|
||||
PHY_vars_UE_g[0][CC_id] = init_ue_vars(frame_parms[CC_id], 0,abstraction_flag);
|
||||
UE[CC_id] = PHY_vars_UE_g[0][CC_id];
|
||||
printf("PHY_vars_UE_g[0][%d] = %p\n",CC_id,UE[CC_id]);
|
||||
|
||||
|
||||
if (phy_test==1)
|
||||
UE[CC_id]->mac_enabled = 0;
|
||||
else
|
||||
else
|
||||
UE[CC_id]->mac_enabled = 1;
|
||||
|
||||
|
||||
if (UE[CC_id]->mac_enabled == 0) { //set default UL parameters for testing mode
|
||||
for (i=0; i<NUMBER_OF_CONNECTED_eNB_MAX; i++) {
|
||||
UE[CC_id]->pusch_config_dedicated[i].betaOffset_ACK_Index = beta_ACK;
|
||||
@@ -897,13 +1007,13 @@ int main( int argc, char **argv )
|
||||
UE[CC_id]->scheduling_request_config[i].dsr_TransMax = sr_n4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UE[CC_id]->UE_scan = UE_scan;
|
||||
UE[CC_id]->UE_scan_carrier = UE_scan_carrier;
|
||||
UE[CC_id]->mode = mode;
|
||||
printf("UE[%d]->mode = %d\n",CC_id,mode);
|
||||
|
||||
if (UE[CC_id]->mac_enabled == 1) {
|
||||
|
||||
if (UE[CC_id]->mac_enabled == 1) {
|
||||
UE[CC_id]->pdcch_vars[0][0]->crnti = 0x1234;
|
||||
UE[CC_id]->pdcch_vars[1][0]->crnti = 0x1234;
|
||||
}else {
|
||||
@@ -912,7 +1022,7 @@ int main( int argc, char **argv )
|
||||
}
|
||||
UE[CC_id]->rx_total_gain_dB = (int)rx_gain[CC_id][0] + rx_gain_off;
|
||||
UE[CC_id]->tx_power_max_dBm = tx_max_power[CC_id];
|
||||
|
||||
|
||||
if (frame_parms[CC_id]->frame_type==FDD) {
|
||||
UE[CC_id]->N_TA_offset = 0;
|
||||
}
|
||||
@@ -923,14 +1033,16 @@ int main( int argc, char **argv )
|
||||
UE[CC_id]->N_TA_offset = 624/2;
|
||||
else if (frame_parms[CC_id]->N_RB_DL == 25)
|
||||
UE[CC_id]->N_TA_offset = 624/4;
|
||||
|
||||
|
||||
}
|
||||
init_openair0();
|
||||
init_openair0();
|
||||
}
|
||||
|
||||
|
||||
printf("Runtime table\n");
|
||||
fill_modeled_runtime_table(runtime_phy_rx,runtime_phy_tx);
|
||||
cpuf=get_cpu_freq_GHz();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -980,6 +1092,9 @@ int main( int argc, char **argv )
|
||||
printf("cannot create ITTI tasks\n");
|
||||
exit(-1); // need a softer mode
|
||||
}
|
||||
if(nfapi_mode==3){ //Panos: Here we should add another nfapi_mode for the case of Supervised LTE-D2D
|
||||
UE_config_stub_pnf();
|
||||
}
|
||||
printf("ITTI tasks created\n");
|
||||
#endif
|
||||
|
||||
@@ -1029,9 +1144,46 @@ int main( int argc, char **argv )
|
||||
|
||||
rt_sleep_ns(10*100000000ULL);
|
||||
|
||||
const char *nfapi_mode_str = "<UNKNOWN>";
|
||||
|
||||
switch(nfapi_mode)
|
||||
{
|
||||
case 0:
|
||||
nfapi_mode_str = "MONOLITHIC";
|
||||
break;
|
||||
case 1:
|
||||
nfapi_mode_str = "PNF";
|
||||
break;
|
||||
case 2:
|
||||
nfapi_mode_str = "VNF";
|
||||
break;
|
||||
case 3:
|
||||
nfapi_mode_str = "UE_STUB_PNF";
|
||||
break;
|
||||
case 4:
|
||||
nfapi_mode_str = "UE_STUB_OFFNET";
|
||||
break;
|
||||
default:
|
||||
nfapi_mode_str = "<UNKNOWN NFAPI MODE>";
|
||||
break;
|
||||
}
|
||||
printf("NFAPI MODE:%s\n", nfapi_mode_str);
|
||||
|
||||
|
||||
// start the main threads
|
||||
int eMBMS_active = 0;
|
||||
init_UE(1,eMBMS_active,uecap_xer_in,0);
|
||||
|
||||
if (nfapi_mode==3) // UE-STUB-PNF
|
||||
{
|
||||
config_sync_var=0;
|
||||
wait_nfapi_init("main?");
|
||||
//Panos: Temporarily we will be using single set of threads for multiple UEs.
|
||||
//init_UE_stub(1,eMBMS_active,uecap_xer_in,emul_iface);
|
||||
init_UE_stub_single_thread(NB_UE_INST,eMBMS_active,uecap_xer_in,emul_iface);
|
||||
}
|
||||
else {
|
||||
init_UE(1,eMBMS_active,uecap_xer_in,0);
|
||||
}
|
||||
|
||||
if (phy_test==0) {
|
||||
printf("Filling UE band info\n");
|
||||
@@ -1039,10 +1191,12 @@ int main( int argc, char **argv )
|
||||
dl_phy_sync_success (0, 0, 0, 1);
|
||||
}
|
||||
|
||||
number_of_cards = 1;
|
||||
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
PHY_vars_UE_g[0][CC_id]->rf_map.card=0;
|
||||
PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset;
|
||||
if (nfapi_mode!=3){
|
||||
number_of_cards = 1;
|
||||
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
PHY_vars_UE_g[0][CC_id]->rf_map.card=0;
|
||||
PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1058,13 +1212,16 @@ int main( int argc, char **argv )
|
||||
UE[CC_id]->hw_timing_advance = 160;
|
||||
#endif
|
||||
}
|
||||
if (setup_ue_buffers(UE,&openair0_cfg[0])!=0) {
|
||||
printf("Error setting up eNB buffer\n");
|
||||
exit(-1);
|
||||
if(nfapi_mode!=3) {
|
||||
if (setup_ue_buffers(UE,&openair0_cfg[0])!=0) {
|
||||
printf("Error setting up eNB buffer\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (input_fd) {
|
||||
printf("Reading in from file to antenna buffer %d\n",0);
|
||||
if (fread(UE[0]->common_vars.rxdata[0],
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
|
||||
+52
-60
@@ -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"
|
||||
|
||||
|
||||
@@ -101,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"
|
||||
@@ -627,12 +627,8 @@ l2l1_task (void *args_p)
|
||||
}
|
||||
|
||||
#endif
|
||||
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);
|
||||
|
||||
@@ -701,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
|
||||
|
||||
@@ -796,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)
|
||||
@@ -874,7 +861,7 @@ l2l1_task (void *args_p)
|
||||
|
||||
|
||||
}
|
||||
update_ocm ();
|
||||
//update_ocm ();
|
||||
/*
|
||||
if ((frame >= 10) && (frame <= 11) && (abstraction_flag == 0)
|
||||
#ifdef PROC
|
||||
@@ -1110,6 +1097,7 @@ int main (int argc, char **argv)
|
||||
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;
|
||||
@@ -1126,7 +1114,7 @@ int 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
|
||||
@@ -1163,7 +1151,37 @@ int 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;
|
||||
@@ -1175,15 +1193,11 @@ int 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);
|
||||
|
||||
@@ -1198,7 +1212,7 @@ int main (int argc, char **argv)
|
||||
|
||||
|
||||
|
||||
if (create_tasks_ue(oai_emulation.info.nb_ue_local) < 0)
|
||||
if (create_tasks_ue(NB_UE_INST) < 0)
|
||||
exit(-1); // need a softer mode
|
||||
|
||||
|
||||
@@ -1211,6 +1225,7 @@ int main (int argc, char **argv)
|
||||
|
||||
|
||||
init_ocm ();
|
||||
|
||||
printf("Sending sync to all threads\n");
|
||||
|
||||
|
||||
@@ -1219,12 +1234,6 @@ int 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 */
|
||||
@@ -1733,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 ();
|
||||
|
||||
@@ -1793,15 +1797,6 @@ oai_shutdown (void)
|
||||
} //End of PHY abstraction changes
|
||||
|
||||
|
||||
// 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)) {
|
||||
destroyMat (ShaF, map1, map2);
|
||||
@@ -1811,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];
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -83,11 +76,6 @@
|
||||
#include "ENB_APP/enb_paramdef.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
|
||||
#ifdef SMBV
|
||||
extern uint8_t config_smbv;
|
||||
extern char smbv_ip[16];
|
||||
#endif
|
||||
|
||||
//constant for OAISIM soft realtime calibration
|
||||
#define SF_DEVIATION_OFFSET_NS 100000 //= 0.1ms : should be as a number of UE
|
||||
#define SLEEP_STEP_US 100 // = 0.01ms could be adaptive, should be as a number of UE
|
||||
@@ -137,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
|
||||
|
||||
@@ -701,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':
|
||||
@@ -870,13 +838,13 @@ void check_and_adjust_params(void)
|
||||
int32_t ret;
|
||||
//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);
|
||||
}
|
||||
|
||||
@@ -931,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)
|
||||
{
|
||||
|
||||
@@ -1020,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);
|
||||
@@ -1369,63 +1272,16 @@ void init_ocm(void)
|
||||
//char* frame_type = "unknown";
|
||||
LTE_DL_FRAME_PARMS *fp = &RC.ru[0]->frame_parms;
|
||||
|
||||
#if 0
|
||||
switch (fp->frame_type) {
|
||||
case FDD:
|
||||
frame_type = "FDD";
|
||||
break;
|
||||
|
||||
case TDD:
|
||||
frame_type = "TDD";
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
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_I(OCM,"Initializing channel (%s, %d) from RU %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,
|
||||
@@ -1454,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;
|
||||
@@ -1515,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++)
|
||||
@@ -1533,9 +1396,6 @@ void update_ocm()
|
||||
// if (oai_emulation.info.omg_model_ue == TRACE)
|
||||
//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++) {
|
||||
@@ -1550,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1585,6 +1445,7 @@ void update_ocm()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef OPENAIR2
|
||||
void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
|
||||
{
|
||||
@@ -1592,13 +1453,12 @@ 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 < NUMBER_OF_UE_MAX; dst_id++) {
|
||||
for (dst_id = 0; dst_id < MAX_MOBILES_PER_ENB; dst_id++) {
|
||||
for_times += 1;
|
||||
|
||||
// generate traffic if the ue is rrc reconfigured state
|
||||
@@ -1631,7 +1491,7 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#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;
|
||||
@@ -1663,10 +1523,10 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
|
||||
otg_pkt=NULL;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
// old version
|
||||
/* // MBSM multicast traffic
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
// 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
|
||||
@@ -1688,15 +1548,15 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
|
||||
}
|
||||
} // end multicast traffic
|
||||
#endif
|
||||
*/
|
||||
/*
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // end multicast traffic
|
||||
*/
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -1706,7 +1566,7 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
|
||||
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);
|
||||
@@ -1735,6 +1595,7 @@ void update_otg_UE(module_id_t ue_mod_idP, unsigned int ctime)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
int init_slot_isr(void)
|
||||
{
|
||||
|
||||
@@ -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