Commit 66cd4fdb authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'enhancement-10-harmony' of...

Merge branch 'enhancement-10-harmony' of https://gitlab.eurecom.fr/oai/openairinterface5g into enhancement-10-harmony
parents 121e33e6 8014a940
...@@ -32,5 +32,4 @@ job1: ...@@ -32,5 +32,4 @@ job1:
- sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR - sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR
- sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $EXTERNAL_SHARE_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$EXTERNAL_SHARE_DIR - sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $EXTERNAL_SHARE_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$EXTERNAL_SHARE_DIR
- cat $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml - cat $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml
- exce_log=`egrep -i 'warning|error|critical|exception' $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest.log |cat `
...@@ -1664,7 +1664,7 @@ target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES}) ...@@ -1664,7 +1664,7 @@ target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} ) target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} )
target_link_libraries (lte-softmodem-nos1 ${LIBBOOST_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 ${LIBBOOST_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem ${T_LIB}) target_link_libraries (lte-softmodem-nos1 ${T_LIB})
# rrh # rrh
################################ ################################
......
This diff is collapsed.
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#arg2 interface #arg2 interface
#arg3 iperf arguments #arg3 iperf arguments
echo "Start time of script: `date`"
args=($*) args=($*)
timeout=${args[0]} timeout=${args[0]}
iface=${args[1]} iface=${args[1]}
...@@ -48,17 +50,57 @@ echo "iface = $iface" ...@@ -48,17 +50,57 @@ echo "iface = $iface"
echo "iperf_args = ${iperf_args[@]}" echo "iperf_args = ${iperf_args[@]}"
echo "ip_client = $ip_client" echo "ip_client = $ip_client"
sleep $timeout
echo " Waiting for IP Address..."
while true; do var=`ifconfig $iface` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5
if [ -n "$ip_client" ]; then
echo "Waiting for route to be setup before iperf makes connection..."
var=`route -n | grep $ip_client`
if ["$var" != "" ] ; then break; fi
# Test an IP address for validity:
# Usage:
# valid_ip IP_ADDRESS
# if [[ $? -eq 0 ]]; then echo good; else echo bad; fi
# OR
# if valid_ip IP_ADDRESS; then echo good; else echo bad; fi
#
function valid_ip()
{
local ip=$1
local stat=1
if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
OIFS=$IFS
IFS='.'
ip=($ip)
IFS=$OIFS
[[ ${ip[0]} -le 255 && ${ip[1]} -le 255 \
&& ${ip[2]} -le 255 && ${ip[3]} -le 255 ]]
stat=$?
fi
return $stat
}
if valid_ip $iface; then
echo "$iface is Valid IP Address. Checking for connectivity..."
ping -c 1 $iface >& /dev/null
while [ "$?" != "0" ]; do
ping -c 1 $iface >& /dev/null
done
echo "$iface connectivity achieved at `date`, Seconds = $SECONDS"
else
echo "Waiting for Interface $iface to come up..."
while true; do var=`ifconfig $iface` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done
echo "$iface is now available at `date` , Seconds = $SECONDS"
fi fi
sleep 5
#if [ -n "$ip_client" ]; then
#echo "Waiting for route to be setup before iperf makes connection..."
# var=`route -n | grep $ip_client`
# if ["$var" != "" ] ; then break; fi
#
#fi
echo "Sleeping for additional $timeout seconds"
sleep $timeout
echo "Starting iperf at `date` , Seconds = $SECONDS ...."
iperf ${iperf_args[@]} iperf ${iperf_args[@]}
################################################################################ ################################################################################
# #
# Copyright (c) 2015, EURECOM (www.eurecom.fr) # Copyright (c) 2015, EURECOM (www.eurecom.fr)
# All rights reserved. # All rights reserved.
...@@ -205,10 +205,8 @@ install_gnutls_from_source(){ ...@@ -205,10 +205,8 @@ install_gnutls_from_source(){
cd /tmp cd /tmp
echo "Downloading gnutls archive" echo "Downloading gnutls archive"
$SUDO rm -rf /tmp/gnutls-3.1.23.tar.xz* /tmp/gnutls-3.1.23 $SUDO rm -rf /tmp/gnutls-3.1.23.tar.xz* /tmp/gnutls-3.1.23
wget http://mirrors.dotsrc.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz wget http://mirrors.dotsrc.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz || \
if [ $? -ne 0 ]; then
wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz
fi
if [ ! -f gnutls-3.1.23.tar.xz ]; then if [ ! -f gnutls-3.1.23.tar.xz ]; then
echo_error "Could not download gnutls source files" echo_error "Could not download gnutls source files"
cd - cd -
...@@ -285,7 +283,8 @@ check_install_additional_tools (){ ...@@ -285,7 +283,8 @@ check_install_additional_tools (){
android-tools-adb \ android-tools-adb \
wvdial \ wvdial \
python-numpy \ python-numpy \
sshpass sshpass \
nscd
$SUDO pip install paramiko $SUDO pip install paramiko
$SUDO pip install pyroute2 $SUDO pip install pyroute2
...@@ -459,6 +458,8 @@ CURPID=$$ ...@@ -459,6 +458,8 @@ CURPID=$$
ppid=$$ ppid=$$
arraycounter=1 arraycounter=1
echo_info "** Trapped CTRL-C. Killing all subprocesses now..." echo_info "** Trapped CTRL-C. Killing all subprocesses now..."
echo_info "** Calling sync now..."
sync
while true while true
do do
FORLOOP=FALSE FORLOOP=FALSE
......
...@@ -95,6 +95,10 @@ ID = ENB_MAC_UE_UL_CE ...@@ -95,6 +95,10 @@ ID = ENB_MAC_UE_UL_CE
DESC = MAC uplink UE received control element DESC = MAC uplink UE received control element
GROUP = ALL:MAC:ENB GROUP = ALL:MAC:ENB
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,ce FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,ce
ID = ENB_MAC_UE_DL_PDU_WITH_DATA
DESC = MAC downlink PDU for an UE
GROUP = ALL:MAC:ENB
FORMAT = int,eNB_ID : int,CC_id : int,rnti : int,frame : int,subframe : int,harq_pid : buffer,data
#RLC logs #RLC logs
ID = ENB_RLC_DL ID = ENB_RLC_DL
......
...@@ -34,11 +34,14 @@ static void scroll(void *private, gui *g, ...@@ -34,11 +34,14 @@ static void scroll(void *private, gui *g,
int number_of_lines; int number_of_lines;
int new_line; int new_line;
int inc; int inc;
int *d = notification_data;
int key_modifiers = *d;
textlist_state(g, w, &visible_lines, &start_line, &number_of_lines); textlist_state(g, w, &visible_lines, &start_line, &number_of_lines);
inc = 10; inc = 10;
if (inc > visible_lines - 2) inc = visible_lines - 2; if (inc > visible_lines - 2) inc = visible_lines - 2;
if (inc < 1) inc = 1; if (inc < 1) inc = 1;
if (key_modifiers & KEY_CONTROL) inc = 1;
if (!strcmp(notification, "scrollup")) inc = -inc; if (!strcmp(notification, "scrollup")) inc = -inc;
new_line = start_line + inc; new_line = start_line + inc;
......
...@@ -83,8 +83,8 @@ int new_color(gui *gui, char *color); ...@@ -83,8 +83,8 @@ int new_color(gui *gui, char *color);
/* notifications */ /* notifications */
/* known notifications: /* known notifications:
* - textlist: * - textlist:
* - scrollup { void *: NULL } * - scrollup { int: key_modifiers }
* - scrolldown { void *: NULL } * - scrolldown { int: key_modifiers }
* - click { int [2]: line, button } * - click { int [2]: line, button }
* - label: * - label:
* - click { int: button } (if enabled) * - click { int: button } (if enabled)
......
...@@ -54,11 +54,11 @@ static void button(gui *_g, widget *_this, int x, int y, ...@@ -54,11 +54,11 @@ static void button(gui *_g, widget *_this, int x, int y,
x -= this->common.x; x -= this->common.x;
/* scroll up */ /* scroll up */
if (button == 4 && up == 0) { if (button == 4 && up == 0) {
gui_notify(g, "scrollup", _this, NULL); gui_notify(g, "scrollup", _this, &key_modifiers);
} }
/* scroll down */ /* scroll down */
if (button == 5 && up == 0) { if (button == 5 && up == 0) {
gui_notify(g, "scrolldown", _this, NULL); gui_notify(g, "scrolldown", _this, &key_modifiers);
} }
/* button 1/2/3 click */ /* button 1/2/3 click */
if (button >= 1 && button <= 3 && up == 0) { if (button >= 1 && button <= 3 && up == 0) {
......
...@@ -89,6 +89,8 @@ static void scroll(void *private, gui *g, ...@@ -89,6 +89,8 @@ static void scroll(void *private, gui *g,
int number_of_lines; int number_of_lines;
int new_line; int new_line;
int inc; int inc;
int *d = notification_data;
int key_modifiers = *d;
if (pthread_mutex_lock(&this->lock)) abort(); if (pthread_mutex_lock(&this->lock)) abort();
...@@ -96,6 +98,7 @@ static void scroll(void *private, gui *g, ...@@ -96,6 +98,7 @@ static void scroll(void *private, gui *g,
inc = 10; inc = 10;
if (inc > visible_lines - 2) inc = visible_lines - 2; if (inc > visible_lines - 2) inc = visible_lines - 2;
if (inc < 1) inc = 1; if (inc < 1) inc = 1;
if (key_modifiers & KEY_CONTROL) inc = 1;
if (!strcmp(notification, "scrollup")) inc = -inc; if (!strcmp(notification, "scrollup")) inc = -inc;
new_line = start_line + inc; new_line = start_line + inc;
...@@ -122,7 +125,19 @@ static void click(void *private, gui *g, ...@@ -122,7 +125,19 @@ static void click(void *private, gui *g,
if (pthread_mutex_lock(&this->lock)) abort(); if (pthread_mutex_lock(&this->lock)) abort();
if (button == 1) this->autoscroll = 1 - this->autoscroll; if (button == 1) this->autoscroll = 1;
if (button == 3) this->autoscroll = 0;
if (this->autoscroll) {
int visible_lines, start_line, number_of_lines;
textlist_state(this->g, this->w, &visible_lines, &start_line,
&number_of_lines);
start_line = number_of_lines - visible_lines;
if (start_line < 0) start_line = 0;
textlist_set_start_line(this->g, this->w, start_line);
/* this call is not necessary, but if things change in textlist... */
widget_dirty(this->g, this->w);
}
if (pthread_mutex_unlock(&this->lock)) abort(); if (pthread_mutex_unlock(&this->lock)) abort();
} }
......
...@@ -43,10 +43,6 @@ ...@@ -43,10 +43,6 @@
#include "assertions.h" #include "assertions.h"
#include <math.h> #include <math.h>
#ifdef EXMIMO
extern openair0_rf_map rf_map[MAX_NUM_CCs];
#endif
extern uint16_t prach_root_sequence_map0_3[838]; extern uint16_t prach_root_sequence_map0_3[838];
extern uint16_t prach_root_sequence_map4[138]; extern uint16_t prach_root_sequence_map4[138];
uint8_t dmrs1_tab[8] = {0,2,3,4,6,8,9,10}; uint8_t dmrs1_tab[8] = {0,2,3,4,6,8,9,10};
...@@ -672,7 +668,7 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id, ...@@ -672,7 +668,7 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
int CC_id) int CC_id)
{ {
//PHY_VARS_eNB *eNB = PHY_vars_eNB_g[Mod_id][CC_id];
uint8_t UE_id = find_ue(rnti,PHY_vars_eNB_g[Mod_id][0]); uint8_t UE_id = find_ue(rnti,PHY_vars_eNB_g[Mod_id][0]);
struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10 = sCellToAddMod_r10->radioResourceConfigDedicatedSCell_r10->physicalConfigDedicatedSCell_r10; struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10 = sCellToAddMod_r10->radioResourceConfigDedicatedSCell_r10->physicalConfigDedicatedSCell_r10;
//struct RadioResourceConfigCommonSCell_r10 *physicalConfigCommonSCell_r10 = sCellToAddMod_r10->radioResourceConfigCommonSCell_r10; //struct RadioResourceConfigCommonSCell_r10 *physicalConfigCommonSCell_r10 = sCellToAddMod_r10->radioResourceConfigCommonSCell_r10;
...@@ -682,13 +678,14 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id, ...@@ -682,13 +678,14 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
#ifdef EXMIMO #ifdef EXMIMO
#ifdef DRIVER2013 #ifdef DRIVER2013
exmimo_config_t *p_exmimo_config = openair0_exmimo_pci[rf_map[CC_id].card].exmimo_config_ptr; // exmimo_config_t *p_exmimo_config = openair0_exmimo_pci[rf_map[CC_id].card].exmimo_config_ptr;
#endif #endif
#endif #endif
if ((dl_CarrierFreq_r10>=36000) && (dl_CarrierFreq_r10<=36199)) { if ((dl_CarrierFreq_r10>=36000) && (dl_CarrierFreq_r10<=36199)) {
carrier_freq_local = 1900000000 + (dl_CarrierFreq_r10-36000)*100000; //band 33 from 3GPP 36.101 v 10.9 Table 5.7.3-1 carrier_freq_local = 1900000000 + (dl_CarrierFreq_r10-36000)*100000; //band 33 from 3GPP 36.101 v 10.9 Table 5.7.3-1
LOG_I(PHY,"[eNB %d] Frame %d: Configured SCell %d to frequency %d (ARFCN %d) for UE %d\n",Mod_id,/*eNB->frame*/0,CC_id,carrier_freq_local,dl_CarrierFreq_r10,UE_id); LOG_I(PHY,"[eNB %d] Frame %d: Configured SCell %d to frequency %d (ARFCN %d) for UE %d\n",Mod_id,/*eNB->frame*/0,CC_id,carrier_freq_local,dl_CarrierFreq_r10,UE_id);
/*
#ifdef EXMIMO #ifdef EXMIMO
#ifdef DRIVER2013 #ifdef DRIVER2013
//carrier_freq[CC_id] = carrier_freq_local; //carrier_freq[CC_id] = carrier_freq_local;
...@@ -700,11 +697,12 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id, ...@@ -700,11 +697,12 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
p_exmimo_config->rf.rf_local[rf_map[CC_id].chain] = 8255063; //this should be taken form calibration file p_exmimo_config->rf.rf_local[rf_map[CC_id].chain] = 8255063; //this should be taken form calibration file
p_exmimo_config->rf.rffe_band_mode[rf_map[CC_id].chain] = B19G_TDD; p_exmimo_config->rf.rffe_band_mode[rf_map[CC_id].chain] = B19G_TDD;
#endif #endif
#endif #endif*/
} else if ((dl_CarrierFreq_r10>=6150) && (dl_CarrierFreq_r10<=6449)) { } else if ((dl_CarrierFreq_r10>=6150) && (dl_CarrierFreq_r10<=6449)) {
carrier_freq_local = 832000000 + (dl_CarrierFreq_r10-6150)*100000; //band 20 from 3GPP 36.101 v 10.9 Table 5.7.3-1 carrier_freq_local = 832000000 + (dl_CarrierFreq_r10-6150)*100000; //band 20 from 3GPP 36.101 v 10.9 Table 5.7.3-1
// this is actually for the UL only, but we use it for DL too, since there is no TDD mode for this band // this is actually for the UL only, but we use it for DL too, since there is no TDD mode for this band
LOG_I(PHY,"[eNB %d] Frame %d: Configured SCell %d to frequency %d (ARFCN %d) for UE %d\n",Mod_id,/*eNB->frame*/0,CC_id,carrier_freq_local,dl_CarrierFreq_r10,UE_id); LOG_I(PHY,"[eNB %d] Frame %d: Configured SCell %d to frequency %d (ARFCN %d) for UE %d\n",Mod_id,/*eNB->frame*/0,CC_id,carrier_freq_local,dl_CarrierFreq_r10,UE_id);
/*
#ifdef EXMIMO #ifdef EXMIMO
#ifdef DRIVER2013 #ifdef DRIVER2013
//carrier_freq[CC_id] = carrier_freq_local; //carrier_freq[CC_id] = carrier_freq_local;
...@@ -717,6 +715,7 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id, ...@@ -717,6 +715,7 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
p_exmimo_config->rf.rffe_band_mode[rf_map[CC_id].chain] = DD_TDD; p_exmimo_config->rf.rffe_band_mode[rf_map[CC_id].chain] = DD_TDD;
#endif #endif
#endif #endif
*/
} else { } else {
LOG_E(PHY,"[eNB %d] Frame %d: ARFCN %d of SCell %d for UE %d not supported\n",Mod_id,/*eNB->frame*/0,dl_CarrierFreq_r10,CC_id,UE_id); LOG_E(PHY,"[eNB %d] Frame %d: ARFCN %d of SCell %d for UE %d not supported\n",Mod_id,/*eNB->frame*/0,dl_CarrierFreq_r10,CC_id,UE_id);
} }
......
...@@ -133,7 +133,7 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type ...@@ -133,7 +133,7 @@ void send_IF4p5(PHY_VARS_eNB *eNB, int frame, int subframe, uint16_t packet_type
} }
} else if (packet_type == IF4p5_PRACH) { } else if (packet_type == IF4p5_PRACH) {
// FIX: hard coded prach samples length // FIX: hard coded prach samples length
db_fulllength = 839*2; db_fulllength = 840*2;
IF4p5_header_t *prach_header = (IF4p5_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES); IF4p5_header_t *prach_header = (IF4p5_header_t *)(tx_buffer + MAC_HEADER_SIZE_BYTES);
data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t); data_block = (uint16_t*)(tx_buffer + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t);
...@@ -197,7 +197,8 @@ void recv_IF4p5(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_t ...@@ -197,7 +197,8 @@ void recv_IF4p5(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_t
*frame = ((packet_header->frame_status)>>6)&0xffff; *frame = ((packet_header->frame_status)>>6)&0xffff;
*subframe = ((packet_header->frame_status)>>22)&0x000f; *subframe = ((packet_header->frame_status)>>22)&0x000f;
if (*packet_type == IF4p5_PDLFFT) { if (*packet_type == IF4p5_PDLFFT) {
*symbol_number = ((packet_header->frame_status)>>26)&0x000f; *symbol_number = ((packet_header->frame_status)>>26)&0x000f;
...@@ -232,7 +233,7 @@ void recv_IF4p5(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_t ...@@ -232,7 +233,7 @@ void recv_IF4p5(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_t
} else if (*packet_type == IF4p5_PRACH) { } else if (*packet_type == IF4p5_PRACH) {
// FIX: hard coded prach samples length // FIX: hard coded prach samples length
db_fulllength = 839*2; db_fulllength = 840*2;
memcpy((&rxsigF[0][0]), memcpy((&rxsigF[0][0]),
(int16_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES+sizeof_IF4p5_header_t), (int16_t*) (rx_buffer+MAC_HEADER_SIZE_BYTES+sizeof_IF4p5_header_t),
...@@ -261,6 +262,7 @@ void gen_IF4p5_dl_header(IF4p5_header_t *dl_packet, int frame, int subframe) { ...@@ -261,6 +262,7 @@ void gen_IF4p5_dl_header(IF4p5_header_t *dl_packet, int frame, int subframe) {
void gen_IF4p5_ul_header(IF4p5_header_t *ul_packet, int frame, int subframe) { void gen_IF4p5_ul_header(IF4p5_header_t *ul_packet, int frame, int subframe) {
ul_packet->type = IF4p5_PACKET_TYPE; ul_packet->type = IF4p5_PACKET_TYPE;
ul_packet->sub_type = IF4p5_PULFFT; ul_packet->sub_type = IF4p5_PULFFT;
......
...@@ -66,7 +66,7 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe ...@@ -66,7 +66,7 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 1 );
eNB->ifdevice.trx_write_func(&eNB->ifdevice, eNB->ifdevice.trx_write_func(&eNB->ifdevice,
(proc_timestamp + packet_id*spp_eth), (proc_timestamp + packet_id*spp_eth),
txp, (void**)txp,
spp_eth, spp_eth,
fp->nb_antennas_tx, fp->nb_antennas_tx,
0); 0);
...@@ -86,7 +86,7 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe ...@@ -86,7 +86,7 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF, 1 );
eNB->ifdevice.trx_write_func(&eNB->ifdevice, eNB->ifdevice.trx_write_func(&eNB->ifdevice,
(proc_timestamp + packet_id*spp_eth), (proc_timestamp + packet_id*spp_eth),
rxp, (void**)rxp,
spp_eth, spp_eth,
fp->nb_antennas_rx, fp->nb_antennas_rx,
0); 0);
...@@ -131,7 +131,7 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe ...@@ -131,7 +131,7 @@ void send_IF5(PHY_VARS_eNB *eNB, openair0_timestamp proc_timestamp, int subframe
// Write the packet to the fronthaul // Write the packet to the fronthaul
if ((eNB->ifdevice.trx_write_func(&eNB->ifdevice, if ((eNB->ifdevice.trx_write_func(&eNB->ifdevice,
packet_id, packet_id,
&tx_buffer, (void**)&tx_buffer,
db_fulllength, db_fulllength,
1, 1,
IF5_MOBIPASS)) < 0) { IF5_MOBIPASS)) < 0) {
...@@ -177,7 +177,7 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram ...@@ -177,7 +177,7 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF, 1 );
eNB->ifdevice.trx_read_func(&eNB->ifdevice, eNB->ifdevice.trx_read_func(&eNB->ifdevice,
&timestamp[packet_id], &timestamp[packet_id],
txp, (void**)txp,
spp_eth, spp_eth,
fp->nb_antennas_tx); fp->nb_antennas_tx);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF, 0 );
...@@ -197,7 +197,7 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram ...@@ -197,7 +197,7 @@ void recv_IF5(PHY_VARS_eNB *eNB, openair0_timestamp *proc_timestamp, int subfram
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF, 1 );
eNB->ifdevice.trx_read_func(&eNB->ifdevice, eNB->ifdevice.trx_read_func(&eNB->ifdevice,
&timestamp[packet_id], &timestamp[packet_id],
rxp, (void**)rxp,
spp_eth, spp_eth,
fp->nb_antennas_rx); fp->nb_antennas_rx);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF, 0 );
......
...@@ -1065,7 +1065,7 @@ void rx_prach(PHY_VARS_eNB *eNB, ...@@ -1065,7 +1065,7 @@ void rx_prach(PHY_VARS_eNB *eNB,
int i; int i;
lte_frame_type_t frame_type = eNB->frame_parms.frame_type; lte_frame_type_t frame_type = eNB->frame_parms.frame_type;
int subframe = eNB->proc.subframe_rx; int subframe = eNB->proc.subframe_prach;
uint16_t rootSequenceIndex = eNB->frame_parms.prach_config_common.rootSequenceIndex; uint16_t rootSequenceIndex = eNB->frame_parms.prach_config_common.rootSequenceIndex;
uint8_t prach_ConfigIndex = eNB->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex; uint8_t prach_ConfigIndex = eNB->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
uint8_t Ncs_config = eNB->frame_parms.prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig; uint8_t Ncs_config = eNB->frame_parms.prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig;
...@@ -1101,6 +1101,8 @@ void rx_prach(PHY_VARS_eNB *eNB, ...@@ -1101,6 +1101,8 @@ void rx_prach(PHY_VARS_eNB *eNB,
int fft_size,log2_ifft_size; int fft_size,log2_ifft_size;
uint8_t nb_ant_rx = 1; //eNB->frame_parms.nb_antennas_rx; uint8_t nb_ant_rx = 1; //eNB->frame_parms.nb_antennas_rx;
// int en;
for (aa=0; aa<nb_ant_rx; aa++) { for (aa=0; aa<nb_ant_rx; aa++) {
prach[aa] = (int16_t*)&eNB->common_vars.rxdata[0][aa][subframe*eNB->frame_parms.samples_per_tti-eNB->N_TA_offset]; prach[aa] = (int16_t*)&eNB->common_vars.rxdata[0][aa][subframe*eNB->frame_parms.samples_per_tti-eNB->N_TA_offset];
} }
...@@ -1282,8 +1284,11 @@ void rx_prach(PHY_VARS_eNB *eNB, ...@@ -1282,8 +1284,11 @@ void rx_prach(PHY_VARS_eNB *eNB,
k*=2; k*=2;
/// **** send_IF4 of rxsigF to RCC **** /// /// **** send_IF4 of rxsigF to RCC **** ///
send_IF4p5(eNB, eNB->proc.frame_rx, eNB->proc.subframe_rx, IF4p5_PRACH, k); send_IF4p5(eNB, eNB->proc.frame_prach, eNB->proc.subframe_prach, IF4p5_PRACH, k);
// en = dB_fixed(signal_energy(&rxsigF[0][k],840));
// if (en>60)
// printf("PRACH: Frame %d, Subframe %d => %d dB\n",eNB->proc.frame_rx,eNB->proc.subframe_rx,en);
return; return;
} else if (eNB->node_function == NGFI_RCC_IF4p5) { } else if (eNB->node_function == NGFI_RCC_IF4p5) {
k = (12*n_ra_prb) - 6*eNB->frame_parms.N_RB_UL; k = (12*n_ra_prb) - 6*eNB->frame_parms.N_RB_UL;
...@@ -1299,7 +1304,12 @@ void rx_prach(PHY_VARS_eNB *eNB, ...@@ -1299,7 +1304,12 @@ void rx_prach(PHY_VARS_eNB *eNB,
// Adjust received rxsigF offset // Adjust received rxsigF offset
memmove((&rxsigF[0][k]), memmove((&rxsigF[0][k]),
(&rxsigF[0][0]), (&rxsigF[0][0]),
839*2*sizeof(int16_t)); 839*2*sizeof(int16_t));
//en = dB_fixed(signal_energy(&rxsigF[0][k],840));
// if (en>60)
//printf("PRACH: Frame %d, Subframe %d => %d dB\n",eNB->proc.frame_rx,eNB->proc.subframe_rx,en);
} }
// in case of RCC and prach received rx_thread wakes up prach // in case of RCC and prach received rx_thread wakes up prach
...@@ -1469,11 +1479,25 @@ void rx_prach(PHY_VARS_eNB *eNB, ...@@ -1469,11 +1479,25 @@ void rx_prach(PHY_VARS_eNB *eNB,
#endif #endif
// if (aa=1) write_output("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1); // if (aa=1) write_output("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1);
}// antennas_rx }// antennas_rx
#ifdef PRACH_DEBUG #ifdef PRACH_DEBUG
write_output("prach_ifft0.m","prach_t0",prach_ifft[0],2048,1,1);
if (en>40) {
k = (12*n_ra_prb) - 6*eNB->frame_parms.N_RB_UL;
if (k<0)
k+=(eNB->frame_parms.ofdm_symbol_size);
k*=12;
k+=13;
k*=2;
printf("Dumping prach, k = %d (n_ra_prb %d)\n",k,n_ra_prb);
write_output("rxsigF.m","prach_rxF",&rxsigF[0][k],840,1,1);
write_output("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
write_output("prach_ifft0.m","prach_t0",prach_ifft[0],1024,1,1);
exit(-1);
}
#endif #endif
// write_output("prach_ifft1.m","prach_t1",prach_ifft[1],2048,1,1);
} // new dft } // new dft
// check energy in nth time shift // check energy in nth time shift
......
...@@ -160,10 +160,10 @@ enum transmission_access_mode { ...@@ -160,10 +160,10 @@ enum transmission_access_mode {
typedef enum { typedef enum {
eNodeB_3GPP=0, // classical eNodeB function eNodeB_3GPP=0, // classical eNodeB function
eNodeB_3GPP_BBU, // eNodeB with NGFI IF5 eNodeB_3GPP_BBU, // eNodeB with NGFI IF5
NGFI_RRU_IF5, // NGFI_RRU with IF5 NGFI_RCC_IF4p5, // NGFI_RCC (NGFI radio cloud center)
NGFI_RRU_IF4p5, // NGFI_RRU (NGFI remote radio-unit, currently split at common - ue_specific interface, IF4p5) NGFI_RAU_IF4p5,
NGFI_RCC_IF4p5, // NGFI_RCC (NGFI radio cloud center, currently split at common - ue_specific interface, IF4p5) NGFI_RRU_IF5, // NGFI_RRU (NGFI remote radio-unit,IF5)
NGFI_RAU_IF4p5 NGFI_RRU_IF4p5 // NGFI_RRU (NGFI remote radio-unit,IF4p5)
} eNB_func_t; } eNB_func_t;
typedef enum { typedef enum {
...@@ -252,34 +252,42 @@ typedef struct eNB_proc_t_s { ...@@ -252,34 +252,42 @@ typedef struct eNB_proc_t_s {
/// \brief Instance count for rx processing thread. /// \brief Instance count for rx processing thread.
/// \internal This variable is protected by \ref mutex_prach. /// \internal This variable is protected by \ref mutex_prach.
int instance_cnt_prach; int instance_cnt_prach;
/// \internal This variable is protected by \ref mutex_asynch_rxtx.
int instance_cnt_asynch_rxtx;
/// pthread structure for FH processing thread /// pthread structure for FH processing thread
pthread_t pthread_FH; pthread_t pthread_FH;
/// pthread structure for asychronous RX processing thread /// pthread structure for asychronous RX/TX processing thread
pthread_t pthread_asynch_rx; pthread_t pthread_asynch_rxtx;
/// flag to indicate first RX acquisition /// flag to indicate first RX acquisition
int first_rx; int first_rx;
/// flag to indicate first TX transmission
int first_tx;
/// pthread attributes for FH processing thread /// pthread attributes for FH processing thread
pthread_attr_t attr_FH; pthread_attr_t attr_FH;
/// pthread attributes for prach processing thread /// pthread attributes for prach processing thread
pthread_attr_t attr_prach; pthread_attr_t attr_prach;
/// pthread attributes for asynchronous RX thread /// pthread attributes for asynchronous RX thread
pthread_attr_t attr_asynch_rx; pthread_attr_t attr_asynch_rxtx;
/// scheduling parameters for FH thread /// scheduling parameters for FH thread
struct sched_param sched_param_FH; struct sched_param sched_param_FH;
/// scheduling parameters for prach thread /// scheduling parameters for prach thread
struct sched_param sched_param_prach; struct sched_param sched_param_prach;
/// scheduling parameters for asynch_rx thread /// scheduling parameters for asynch_rxtx thread
struct sched_param sched_param_asynch_rx; struct sched_param sched_param_asynch_rxtx;
/// condition variable for FH thread /// pthread structure for PRACH thread
pthread_t pthread_prach; pthread_t pthread_prach;
/// condition variable for FH thread /// condition variable for FH thread
pthread_cond_t cond_FH; pthread_cond_t cond_FH;
/// condition variable for PRACH processing thread; /// condition variable for PRACH processing thread;
pthread_cond_t cond_prach; pthread_cond_t cond_prach;
/// condition variable for asynch RX/TX thread
pthread_cond_t cond_asynch_rxtx;
/// mutex for FH /// mutex for FH
pthread_mutex_t mutex_FH; pthread_mutex_t mutex_FH;
/// mutex for PRACH thread /// mutex for PRACH thread
pthread_mutex_t mutex_prach; pthread_mutex_t mutex_prach;
/// mutex for asynch RX/TX thread
pthread_mutex_t mutex_asynch_rxtx;
/// set of scheduling variables RXn-TXnp4 threads /// set of scheduling variables RXn-TXnp4 threads
eNB_rxtx_proc_t proc_rxtx[2]; eNB_rxtx_proc_t proc_rxtx[2];
/// number of slave threads /// number of slave threads
...@@ -355,15 +363,17 @@ typedef struct PHY_VARS_eNB_s { ...@@ -355,15 +363,17 @@ typedef struct PHY_VARS_eNB_s {
eNB_proc_t proc; eNB_proc_t proc;
eNB_func_t node_function; eNB_func_t node_function;
eNB_timing_t node_timing; eNB_timing_t node_timing;
openair0_rf_map rf_map;
int abstraction_flag; int abstraction_flag;
void (*do_prach)(struct PHY_VARS_eNB_s *eNB,eNB_proc_t *proc); void (*do_prach)(struct PHY_VARS_eNB_s *eNB);
void (*fep)(struct PHY_VARS_eNB_s *eNB,eNB_proc_t *proc); void (*fep)(struct PHY_VARS_eNB_s *eNB);
void (*proc_uespec_rx)(struct PHY_VARS_eNB_s *eNB,eNB_rxtx_proc_t *proc,const relaying_type_t r_type); void (*proc_uespec_rx)(struct PHY_VARS_eNB_s *eNB,eNB_rxtx_proc_t *proc,const relaying_type_t r_type);
void (*proc_tx)(struct PHY_VARS_eNB_s *eNB,eNB_rxtx_proc_t *proc,relaying_type_t r_type,PHY_VARS_RN *rn); void (*proc_tx)(struct PHY_VARS_eNB_s *eNB,eNB_rxtx_proc_t *proc,relaying_type_t r_type,PHY_VARS_RN *rn);
void (*tx_fh)(struct PHY_VARS_eNB_s *eNB,eNB_rxtx_proc_t *proc); void (*tx_fh)(struct PHY_VARS_eNB_s *eNB,eNB_rxtx_proc_t *proc);
void (*rx_fh)(struct PHY_VARS_eNB_s *eNB,eNB_proc_t *proc,int *frame, int *subframe); void (*rx_fh)(struct PHY_VARS_eNB_s *eNB,int *frame, int *subframe);
int (*start_rf)(struct PHY_VARS_eNB_s *eNB); int (*start_rf)(struct PHY_VARS_eNB_s *eNB);
int (*start_if)(struct PHY_VARS_eNB_s *eNB); int (*start_if)(struct PHY_VARS_eNB_s *eNB);
void (*fh_asynch)(struct PHY_VARS_eNB_s *eNB,int *frame, int *subframe);
uint8_t local_flag; uint8_t local_flag;
uint32_t rx_total_gain_dB; uint32_t rx_total_gain_dB;
LTE_DL_FRAME_PARMS frame_parms; LTE_DL_FRAME_PARMS frame_parms;
...@@ -570,6 +580,8 @@ typedef struct { ...@@ -570,6 +580,8 @@ typedef struct {
uint8_t Mod_id; uint8_t Mod_id;
/// \brief Component carrier ID for this PHY instance /// \brief Component carrier ID for this PHY instance
uint8_t CC_id; uint8_t CC_id;
/// \brief Mapping of CC_id antennas to cards
openair0_rf_map rf_map;
//uint8_t local_flag; //uint8_t local_flag;
/// \brief Indicator of current run mode of UE (normal_txrx, rx_calib_ue, no_L2_connect, debug_prach) /// \brief Indicator of current run mode of UE (normal_txrx, rx_calib_ue, no_L2_connect, debug_prach)
runmode_t mode; runmode_t mode;
......
...@@ -139,7 +139,7 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682 ...@@ -139,7 +139,7 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682
*/ */
char eNB_functions[5][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RRU_IF5","NGFI_RRU_IF4","NGFI_RCC_IF4"}; char eNB_functions[6][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RCC_IF4p5","NGFI_RAI_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5",};
char eNB_timing[2][20]={"synch_to_ext_device","synch_to_other"}; char eNB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
......
...@@ -1107,6 +1107,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -1107,6 +1107,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
uint8_t smbv_alloc_cnt = 1; uint8_t smbv_alloc_cnt = 1;
#endif #endif
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_DL)) return;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(subframe&1),1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(subframe&1),1);
start_meas(&eNB->phy_proc_tx); start_meas(&eNB->phy_proc_tx);
...@@ -1918,7 +1920,7 @@ void prach_procedures(PHY_VARS_eNB *eNB) { ...@@ -1918,7 +1920,7 @@ void prach_procedures(PHY_VARS_eNB *eNB) {
eNB->UE_stats[(uint32_t)UE_id].UE_timing_offset = preamble_delay_list[preamble_max]&0x1FFF; //limit to 13 (=11+2) bits eNB->UE_stats[(uint32_t)UE_id].UE_timing_offset = preamble_delay_list[preamble_max]&0x1FFF; //limit to 13 (=11+2) bits
eNB->UE_stats[(uint32_t)UE_id].sector = 0; eNB->UE_stats[(uint32_t)UE_id].sector = 0;
LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure (UE_id %d) with preamble %d, energy %d.%d dB, delay %d\n", LOG_D(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure (UE_id %d) with preamble %d, energy %d.%d dB, delay %d\n",
eNB->Mod_id, eNB->Mod_id,
eNB->CC_id, eNB->CC_id,
frame, frame,
...@@ -2490,8 +2492,9 @@ void cba_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq_p ...@@ -2490,8 +2492,9 @@ void cba_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,int UE_id,int harq_p
} }
void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_proc_t *proc) { void eNB_fep_full(PHY_VARS_eNB *eNB) {
eNB_proc_t *proc = &eNB->proc;
int l; int l;
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms; LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
...@@ -2503,7 +2506,7 @@ void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_proc_t *proc) { ...@@ -2503,7 +2506,7 @@ void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_proc_t *proc) {
&eNB->common_vars, &eNB->common_vars,
l, l,
proc->subframe_rx<<1, proc->subframe_rx<<1,
0, 0,
0 0
); );
slot_fep_ul(fp, slot_fep_ul(fp,
...@@ -2519,14 +2522,13 @@ void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_proc_t *proc) { ...@@ -2519,14 +2522,13 @@ void eNB_fep_full(PHY_VARS_eNB *eNB,eNB_proc_t *proc) {
if (eNB->node_function == NGFI_RRU_IF4p5) { if (eNB->node_function == NGFI_RRU_IF4p5) {
/// **** send_IF4 of rxdataF to RCC (no prach now) **** /// /// **** send_IF4 of rxdataF to RCC (no prach now) **** ///
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 1 );
send_IF4p5(eNB, proc->frame_rx, proc->subframe_rx, IF4p5_PULFFT, 0); send_IF4p5(eNB, proc->frame_rx, proc->subframe_rx, IF4p5_PULFFT, 0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4, 0 ); }
}
} }
void eNB_fep_rru_if5(PHY_VARS_eNB *eNB,eNB_proc_t *proc) { void eNB_fep_rru_if5(PHY_VARS_eNB *eNB) {
eNB_proc_t *proc=&eNB->proc;
uint8_t seqno=0; uint8_t seqno=0;
/// **** send_IF5 of rxdata to BBU **** /// /// **** send_IF5 of rxdata to BBU **** ///
...@@ -2536,8 +2538,9 @@ void eNB_fep_rru_if5(PHY_VARS_eNB *eNB,eNB_proc_t *proc) { ...@@ -2536,8 +2538,9 @@ void eNB_fep_rru_if5(PHY_VARS_eNB *eNB,eNB_proc_t *proc) {
} }
void do_prach(PHY_VARS_eNB *eNB,eNB_proc_t *proc) { void do_prach(PHY_VARS_eNB *eNB) {
eNB_proc_t *proc = &eNB->proc;
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms; LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
// check if we have to detect PRACH first // check if we have to detect PRACH first
...@@ -2581,11 +2584,14 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB){ ...@@ -2581,11 +2584,14 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB){
eNB_proc_t *proc = &eNB->proc; eNB_proc_t *proc = &eNB->proc;
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
const int subframe = proc->subframe_rx; const int subframe = proc->subframe_rx;
const int frame = proc->frame_rx; const int frame = proc->frame_rx;
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+(subframe&1), 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+(subframe&1), 1 );
start_meas(&eNB->phy_proc_rx); start_meas(&eNB->phy_proc_rx);
...@@ -2594,9 +2600,9 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB){ ...@@ -2594,9 +2600,9 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB){
LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_common_RX(%d)\n",eNB->Mod_id,frame,subframe); LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_common_RX(%d)\n",eNB->Mod_id,frame,subframe);
if (eNB->fep) eNB->fep(eNB,proc); if (eNB->fep) eNB->fep(eNB);
if (eNB->do_prach) eNB->do_prach(eNB,proc); if (eNB->do_prach) eNB->do_prach(eNB);
...@@ -2619,6 +2625,8 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const ...@@ -2619,6 +2625,8 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
const int subframe = proc->subframe_rx; const int subframe = proc->subframe_rx;
const int frame = proc->frame_rx; const int frame = proc->frame_rx;
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC+(subframe&1), 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC+(subframe&1), 1 );
start_meas(&eNB->phy_proc_rx); start_meas(&eNB->phy_proc_rx);
#ifdef DEBUG_PHY_PROC #ifdef DEBUG_PHY_PROC
......
...@@ -303,7 +303,7 @@ void enb_config_display(void) ...@@ -303,7 +303,7 @@ void enb_config_display(void)
printf( "\ttx_scheduling_advance :\t%d:\n",enb_properties.properties[i]->rrh_gw_config[j].tx_scheduling_advance); printf( "\ttx_scheduling_advance :\t%d:\n",enb_properties.properties[i]->rrh_gw_config[j].tx_scheduling_advance);
printf( "\ttx_sample_advance : \t%d:\n",enb_properties.properties[i]->rrh_gw_config[j].tx_sample_advance); printf( "\ttx_sample_advance : \t%d:\n",enb_properties.properties[i]->rrh_gw_config[j].tx_sample_advance);
printf( "\tiq_txshift : \t%d:\n",enb_properties.properties[i]->rrh_gw_config[j].iq_txshift); printf( "\tiq_txshift : \t%d:\n",enb_properties.properties[i]->rrh_gw_config[j].iq_txshift);
printf( "\ttransport : \t%s Ethernet:\n",(enb_properties.properties[i]->rrh_gw_config[j].raw == 1)? "RAW" : (enb_properties.properties[i]->rrh_gw_config[j].rawif4 == 1)? "RAW_IF4" : (enb_properties.properties[i]->rrh_gw_config[j].udpif4 == 1)? "UDP_IF4" : (enb_properties.properties[i]->rrh_gw_config[j].rawif5_mobipass == 1)? "RAW_IF5_MOBIPASS" : "UDP"); printf( "\ttransport : \t%s Ethernet:\n",(enb_properties.properties[i]->rrh_gw_config[j].raw == 1)? "RAW" : (enb_properties.properties[i]->rrh_gw_config[j].rawif4p5 == 1)? "RAW_IF4p5" : (enb_properties.properties[i]->rrh_gw_config[j].udpif4p5 == 1)? "UDP_IF4p5" : (enb_properties.properties[i]->rrh_gw_config[j].rawif5_mobipass == 1)? "RAW_IF5_MOBIPASS" : "UDP");
if (enb_properties.properties[i]->rrh_gw_config[j].exmimo == 1) { if (enb_properties.properties[i]->rrh_gw_config[j].exmimo == 1) {
printf( "\tRF target : \tEXMIMO:\n"); printf( "\tRF target : \tEXMIMO:\n");
} else if (enb_properties.properties[i]->rrh_gw_config[j].usrp_b200 == 1) { } else if (enb_properties.properties[i]->rrh_gw_config[j].usrp_b200 == 1) {
...@@ -2296,10 +2296,10 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -2296,10 +2296,10 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].udp = 1; enb_properties.properties[enb_properties_index]->rrh_gw_config[j].udp = 1;
} else if (strcmp(tr_preference, "raw") == 0) { } else if (strcmp(tr_preference, "raw") == 0) {
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].raw = 1; enb_properties.properties[enb_properties_index]->rrh_gw_config[j].raw = 1;
} else if (strcmp(tr_preference, "udp_if4") == 0) { } else if (strcmp(tr_preference, "udp_if4p5") == 0) {
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].udpif4 = 1; enb_properties.properties[enb_properties_index]->rrh_gw_config[j].udpif4p5 = 1;
} else if (strcmp(tr_preference, "raw_if4") == 0) { } else if (strcmp(tr_preference, "raw_if4p5") == 0) {
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rawif4 = 1; enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rawif4p5 = 1;
} else if (strcmp(tr_preference, "raw_if5_mobipass") == 0) { } else if (strcmp(tr_preference, "raw_if5_mobipass") == 0) {
enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rawif5_mobipass = 1; enb_properties.properties[enb_properties_index]->rrh_gw_config[j].rawif5_mobipass = 1;
} else {//if (strcmp(preference, "no") == 0) } else {//if (strcmp(preference, "no") == 0)
......
...@@ -87,8 +87,8 @@ typedef struct rrh_gw_config_s { ...@@ -87,8 +87,8 @@ typedef struct rrh_gw_config_s {
char *remote_address; char *remote_address;
uint16_t local_port; uint16_t local_port;
uint16_t remote_port; uint16_t remote_port;
uint8_t udpif4; uint8_t udpif4p5;
uint8_t rawif4; uint8_t rawif4p5;
uint8_t rawif5_mobipass; uint8_t rawif5_mobipass;
int tx_scheduling_advance; int tx_scheduling_advance;
int tx_sample_advance; int tx_sample_advance;
......
...@@ -1102,6 +1102,9 @@ schedule_ue_spec( ...@@ -1102,6 +1102,9 @@ schedule_ue_spec(
module_idP, CC_id, frameP, UE_RNTI(module_idP,UE_id), TBS); module_idP, CC_id, frameP, UE_RNTI(module_idP,UE_id), TBS);
} }
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP),
T_INT(harq_pid), T_BUFFER(UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], TBS));
aggregation = process_ue_cqi(module_idP,UE_id); aggregation = process_ue_cqi(module_idP,UE_id);
UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid] = nb_rb; UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid] = nb_rb;
......
...@@ -65,23 +65,18 @@ int eth_socket_init_raw(openair0_device *device) { ...@@ -65,23 +65,18 @@ int eth_socket_init_raw(openair0_device *device) {
eth_state_t *eth = (eth_state_t*)device->priv; eth_state_t *eth = (eth_state_t*)device->priv;
int Mod_id = device->Mod_id; int Mod_id = device->Mod_id;
const char *local_mac, *remote_mac; const char *local_mac, *remote_mac;
int local_port=0, remote_port=0;
int sock_dom=0; int sock_dom=0;
int sock_type=0; int sock_type=0;
int sock_proto=0; int sock_proto=0;
if (device->host_type == RRH_HOST ) { /* RRH doesn't know remote MAC(will be retrieved from first packet send from BBU) and remote port(don't care) */ if (device->host_type == RRH_HOST ) { /* RRH doesn't know remote MAC(will be retrieved from first packet send from BBU) and remote port(don't care) */
local_mac = device->openair0_cfg->my_addr; local_mac = device->openair0_cfg->my_addr;
local_port = device->openair0_cfg->my_port;
remote_mac = malloc(ETH_ALEN); remote_mac = malloc(ETH_ALEN);
memset(remote_mac,0,ETH_ALEN); memset((void*)remote_mac,0,ETH_ALEN);
remote_port = 0;
printf("[%s] local MAC addr %s remote MAC addr %s\n","RRH", local_mac,remote_mac); printf("[%s] local MAC addr %s remote MAC addr %s\n","RRH", local_mac,remote_mac);
} else { } else {
local_mac = device->openair0_cfg->my_addr; local_mac = device->openair0_cfg->my_addr;
local_port = device->openair0_cfg->my_port;
remote_mac = device->openair0_cfg->remote_addr; remote_mac = device->openair0_cfg->remote_addr;
remote_port = device->openair0_cfg->remote_port;
printf("[%s] local MAC addr %s remote MAC addr %s\n","BBU", local_mac,remote_mac); printf("[%s] local MAC addr %s remote MAC addr %s\n","BBU", local_mac,remote_mac);
} }
...@@ -182,7 +177,7 @@ int trx_eth_write_raw(openair0_device *device, openair0_timestamp timestamp, voi ...@@ -182,7 +177,7 @@ int trx_eth_write_raw(openair0_device *device, openair0_timestamp timestamp, voi
printf("------- TX ------: nu=%x an_id=%d ts%d bytes_sent=%d\n", printf("------- TX ------: nu=%x an_id=%d ts%d bytes_sent=%d\n",
*(uint8_t *)(buff2+ETH_ALEN), *(uint8_t *)(buff2+ETH_ALEN),
*(int16_t *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int16_t)), *(int16_t *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int16_t)),
*(openair0_timestamp *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int32_t)), *(openair0_timestamp *)(buff2 + MAC_HEADER_SIZE_BYTES + sizeof(int32_t)),
bytes_sent); bytes_sent);
dump_packet((device->host_type == BBU_HOST)? "BBU":"RRH", buff2, RAW_PACKET_SIZE_BYTES(nsamps), TX_FLAG); dump_packet((device->host_type == BBU_HOST)? "BBU":"RRH", buff2, RAW_PACKET_SIZE_BYTES(nsamps), TX_FLAG);
#endif #endif
...@@ -224,7 +219,8 @@ int trx_eth_write_raw_IF4p5(openair0_device *device, openair0_timestamp timestam ...@@ -224,7 +219,8 @@ int trx_eth_write_raw_IF4p5(openair0_device *device, openair0_timestamp timestam
eth->tx_nsamps = nblocks; eth->tx_nsamps = nblocks;
memcpy(buff[0], (void*)&eth->eh, MAC_HEADER_SIZE_BYTES); memcpy(buff[0], (void*)&eth->eh, MAC_HEADER_SIZE_BYTES);
bytes_sent = send(eth->sockfd[Mod_id], bytes_sent = send(eth->sockfd[Mod_id],
buff[0], buff[0],
packet_size, packet_size,
...@@ -274,7 +270,7 @@ int trx_eth_read_raw(openair0_device *device, openair0_timestamp *timestamp, voi ...@@ -274,7 +270,7 @@ int trx_eth_read_raw(openair0_device *device, openair0_timestamp *timestamp, voi
if (bytes_received ==-1) { if (bytes_received ==-1) {
eth->num_rx_errors++; eth->num_rx_errors++;
perror("ETHERNET READ: "); perror("ETHERNET IF5 READ: ");
exit(-1); exit(-1);
} else { } else {
/* store the timestamp value from packet's header */ /* store the timestamp value from packet's header */
...@@ -314,14 +310,15 @@ int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestam ...@@ -314,14 +310,15 @@ int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestam
ssize_t packet_size = MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t; ssize_t packet_size = MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t;
IF4p5_header_t *test_header = (IF4p5_header_t*)(buff[0] + MAC_HEADER_SIZE_BYTES); IF4p5_header_t *test_header = (IF4p5_header_t*)(buff[0] + MAC_HEADER_SIZE_BYTES);
bytes_received = recv(eth->sockfd[Mod_id], bytes_received = recv(eth->sockfd[Mod_id],
buff[0], buff[0],
packet_size, packet_size,
MSG_PEEK); MSG_PEEK);
if (bytes_received ==-1) { if (bytes_received ==-1) {
eth->num_rx_errors++; eth->num_rx_errors++;
perror("ETHERNET READ: "); perror("ETHERNET IF4p5 READ (header): ");
exit(-1); exit(-1);
} }
...@@ -334,16 +331,17 @@ int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestam ...@@ -334,16 +331,17 @@ int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestam
} else { } else {
packet_size = RAW_IF4p5_PRACH_SIZE_BYTES; packet_size = RAW_IF4p5_PRACH_SIZE_BYTES;
} }
while(bytes_received < packet_size) { while(bytes_received < packet_size) {
bytes_received = recv(eth->sockfd[Mod_id], bytes_received = recv(eth->sockfd[Mod_id],
buff[0], buff[0],
packet_size, packet_size,
0); 0);
if (bytes_received ==-1) { if (bytes_received ==-1) {
eth->num_rx_errors++; eth->num_rx_errors++;
perror("ETHERNET READ: "); perror("ETHERNET IF4p5 READ (payload): ");
exit(-1); exit(-1);
} else { } else {
eth->rx_actual_nsamps = bytes_received>>1; eth->rx_actual_nsamps = bytes_received>>1;
eth->rx_count++; eth->rx_count++;
...@@ -422,7 +420,6 @@ int eth_get_dev_conf_raw(openair0_device *device) { ...@@ -422,7 +420,6 @@ int eth_get_dev_conf_raw(openair0_device *device) {
eth_state_t *eth = (eth_state_t*)device->priv; eth_state_t *eth = (eth_state_t*)device->priv;
int Mod_id = device->Mod_id; int Mod_id = device->Mod_id;
char str[INET_ADDRSTRLEN];
void *msg; void *msg;
ssize_t msg_len; ssize_t msg_len;
...@@ -453,7 +450,6 @@ int eth_get_dev_conf_raw_IF4p5(openair0_device *device) { ...@@ -453,7 +450,6 @@ int eth_get_dev_conf_raw_IF4p5(openair0_device *device) {
eth_state_t *eth = (eth_state_t*)device->priv; eth_state_t *eth = (eth_state_t*)device->priv;
int Mod_id = device->Mod_id; int Mod_id = device->Mod_id;
char str[INET_ADDRSTRLEN];
void *msg; void *msg;
ssize_t msg_len; ssize_t msg_len;
......
...@@ -63,7 +63,7 @@ uint16_t pck_seq_num = 1; ...@@ -63,7 +63,7 @@ uint16_t pck_seq_num = 1;
uint16_t pck_seq_num_cur=0; uint16_t pck_seq_num_cur=0;
uint16_t pck_seq_num_prev=0; uint16_t pck_seq_num_prev=0;
int eth_socket_init_udp(openair0_device *device) { int eth_socket_init_udp(openair0_device *device) {
int i = 0; int i = 0;
eth_state_t *eth = (eth_state_t*)device->priv; eth_state_t *eth = (eth_state_t*)device->priv;
...@@ -138,6 +138,103 @@ uint16_t pck_seq_num_prev=0; ...@@ -138,6 +138,103 @@ uint16_t pck_seq_num_prev=0;
return 0; return 0;
} }
int trx_eth_read_udp_IF4p5(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc) {
// Read nblocks info from packet itself
int nblocks = nsamps;
int bytes_received=0;
eth_state_t *eth = (eth_state_t*)device->priv;
int Mod_id = device->Mod_id;
ssize_t packet_size = sizeof_IF4p5_header_t;
IF4p5_header_t *test_header = (IF4p5_header_t*)(buff[0]);
bytes_received = recvfrom(eth->sockfd[Mod_id],
buff[0],
packet_size,
0,
(struct sockaddr *)&dest_addr[Mod_id],
(socklen_t *)&addr_len[Mod_id]);
if (bytes_received ==-1) {
eth->num_rx_errors++;
perror("ETHERNET IF4p5 READ (header): ");
exit(-1);
}
*timestamp = test_header->sub_type;
if (test_header->sub_type == IF4p5_PDLFFT) {
packet_size = UDP_IF4p5_PDLFFT_SIZE_BYTES(nblocks);
} else if (test_header->sub_type == IF4p5_PULFFT) {
packet_size = UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks);
} else {
packet_size = UDP_IF4p5_PRACH_SIZE_BYTES;
}
while(bytes_received < packet_size) {
bytes_received = recvfrom(eth->sockfd[Mod_id],
buff[0],
packet_size,
0,
(struct sockaddr *)&dest_addr[Mod_id],
(socklen_t *)&addr_len[Mod_id]);
if (bytes_received ==-1) {
eth->num_rx_errors++;
perror("ETHERNET IF4p5 READ (payload): ");
exit(-1);
} else {
eth->rx_actual_nsamps = bytes_received>>1;
eth->rx_count++;
}
}
eth->rx_nsamps = nsamps;
return(bytes_received);
}
int trx_eth_write_udp_IF4p5(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) {
int nblocks = nsamps;
int bytes_sent = 0;
eth_state_t *eth = (eth_state_t*)device->priv;
int Mod_id = device->Mod_id;
ssize_t packet_size;
if (flags == IF4p5_PDLFFT) {
packet_size = UDP_IF4p5_PDLFFT_SIZE_BYTES(nblocks);
} else if (flags == IF4p5_PULFFT) {
packet_size = UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks);
} else {
printf("trx_eth_write_udp_IF4p5: unknown flags %d\n",flags);
return(-1);
}
eth->tx_nsamps = nblocks;
bytes_sent = sendto(eth->sockfd[Mod_id],
buff[0],
packet_size,
0,
(struct sockaddr*)&dest_addr[Mod_id],
addr_len[Mod_id]);
if (bytes_sent == -1) {
eth->num_tx_errors++;
perror("ETHERNET WRITE: ");
exit(-1);
} else {
eth->tx_actual_nsamps = bytes_sent>>1;
eth->tx_count++;
}
return (bytes_sent);
}
int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int cc, int flags) { int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int cc, int flags) {
int bytes_sent=0; int bytes_sent=0;
...@@ -216,7 +313,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi ...@@ -216,7 +313,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
int bytes_received=0; int bytes_received=0;
eth_state_t *eth = (eth_state_t*)device->priv; eth_state_t *eth = (eth_state_t*)device->priv;
openair0_timestamp prev_timestamp = -1; // openair0_timestamp prev_timestamp = -1;
int Mod_id = device->Mod_id; int Mod_id = device->Mod_id;
int rcvfrom_flag =0; int rcvfrom_flag =0;
int block_cnt=0; int block_cnt=0;
...@@ -298,7 +395,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi ...@@ -298,7 +395,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
pck_seq_num_cur = *(uint16_t *)buff2; pck_seq_num_cur = *(uint16_t *)buff2;
//printf("cur=%d prev=%d buff=%d\n",pck_seq_num_cur,pck_seq_num_prev,*(uint16_t *)(buff2)); //printf("cur=%d prev=%d buff=%d\n",pck_seq_num_cur,pck_seq_num_prev,*(uint16_t *)(buff2));
if ( ( pck_seq_num_cur != (pck_seq_num_prev + 1) ) && !((pck_seq_num_prev==75) && (pck_seq_num_cur==1 ))){ if ( ( pck_seq_num_cur != (pck_seq_num_prev + 1) ) && !((pck_seq_num_prev==75) && (pck_seq_num_cur==1 ))){
printf("out of order packet received1! %d|%d|%d\n",pck_seq_num_cur,pck_seq_num_prev, *timestamp); printf("out of order packet received1! %d|%d|%d\n",pck_seq_num_cur,pck_seq_num_prev,(int)*timestamp);
} }
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM,pck_seq_num_cur); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM,pck_seq_num_cur);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM_PRV,pck_seq_num_prev); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM_PRV,pck_seq_num_prev);
......
...@@ -63,6 +63,7 @@ int trx_eth_start(openair0_device *device) { ...@@ -63,6 +63,7 @@ int trx_eth_start(openair0_device *device) {
/* initialize socket */ /* initialize socket */
if (eth->flags == ETH_RAW_MODE) { if (eth->flags == ETH_RAW_MODE) {
printf("Setting ETHERNET to ETH_RAW_IF5_MODE\n");
if (eth_socket_init_raw(device)!=0) return -1; if (eth_socket_init_raw(device)!=0) return -1;
/* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/ /* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/
if (device->host_type == BBU_HOST) { if (device->host_type == BBU_HOST) {
...@@ -74,6 +75,8 @@ int trx_eth_start(openair0_device *device) { ...@@ -74,6 +75,8 @@ int trx_eth_start(openair0_device *device) {
if(ethernet_tune (device,MTU_SIZE,RAW_PACKET_SIZE_BYTES(device->openair0_cfg->samples_per_packet))!=0) return -1; if(ethernet_tune (device,MTU_SIZE,RAW_PACKET_SIZE_BYTES(device->openair0_cfg->samples_per_packet))!=0) return -1;
if(ethernet_tune (device,RCV_TIMEOUT,999999)!=0) return -1; if(ethernet_tune (device,RCV_TIMEOUT,999999)!=0) return -1;
} else if (eth->flags == ETH_RAW_IF4p5_MODE) { } else if (eth->flags == ETH_RAW_IF4p5_MODE) {
printf("Setting ETHERNET to ETH_RAW_IF4p5_MODE\n");
if (eth_socket_init_raw(device)!=0) return -1; if (eth_socket_init_raw(device)!=0) return -1;
/* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/ /* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/
if (device->host_type == BBU_HOST) { if (device->host_type == BBU_HOST) {
...@@ -83,22 +86,19 @@ int trx_eth_start(openair0_device *device) { ...@@ -83,22 +86,19 @@ int trx_eth_start(openair0_device *device) {
} }
/* adjust MTU wrt number of samples per packet */ /* adjust MTU wrt number of samples per packet */
if(ethernet_tune (device,MTU_SIZE,RAW_IF4p5_PRACH_SIZE_BYTES)!=0) return -1; if(ethernet_tune (device,MTU_SIZE,RAW_IF4p5_PRACH_SIZE_BYTES)!=0) return -1;
if(ethernet_tune (device,RCV_TIMEOUT,5000)!=0) return -1;
if(ethernet_tune (device,RCV_TIMEOUT,999999)!=0) return -1;
} else if (eth->flags == ETH_UDP_IF4p5_MODE) { } else if (eth->flags == ETH_UDP_IF4p5_MODE) {
printf("Setting ETHERNET to UDP_IF4p5_MODE\n");
if (eth_socket_init_udp(device)!=0) return -1;
if (device->host_type == BBU_HOST) {
if(eth_set_dev_conf_udp(device)!=0) return -1;
} else {
if(eth_get_dev_conf_udp(device)!=0) return -1;
}
} else if (eth->flags == ETH_RAW_IF5_MOBIPASS) { } else if (eth->flags == ETH_RAW_IF5_MOBIPASS) {
printf("Setting ETHERNET to RAW_IF5_MODE\n");
if (eth_socket_init_raw(device)!=0) return -1; if (eth_socket_init_raw(device)!=0) return -1;
/* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/
//if (device->host_type == BBU_HOST) {
//if(eth_set_dev_conf_raw_IF4p5(device)!=0) return -1;
//} else {
//if(eth_get_dev_conf_raw_IF4p5(device)!=0) return -1;
//
/* adjust MTU wrt number of samples per packet */
// if(ethernet_tune (device,MTU_SIZE,RAW_PACKET_SIZE_BYTES(device->openair0_cfg->samples_per_packet))!=0) return -1;
} else { } else {
if (eth_socket_init_udp(device)!=0) return -1; if (eth_socket_init_udp(device)!=0) return -1;
/* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/ /* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/
...@@ -167,7 +167,7 @@ int trx_eth_reply(openair0_device *device, void *msg, ssize_t msg_len) { ...@@ -167,7 +167,7 @@ int trx_eth_reply(openair0_device *device, void *msg, ssize_t msg_len) {
int trx_eth_stop(int card) { int trx_eth_stop(openair0_device *device) {
return(0); return(0);
} }
...@@ -195,11 +195,11 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) { ...@@ -195,11 +195,11 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) {
struct timeval timeout; struct timeval timeout;
struct ifreq ifr; struct ifreq ifr;
char system_cmd[256]; char system_cmd[256];
char* if_name=DEFAULT_IF; // char* if_name=DEFAULT_IF;
struct in_addr ia; // struct in_addr ia;
struct if_nameindex *ids; // struct if_nameindex *ids;
int ret=0; int ret=0;
int i=0; // int i=0;
/****************** socket level options ************************/ /****************** socket level options ************************/
switch(option) { switch(option) {
...@@ -234,7 +234,7 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) { ...@@ -234,7 +234,7 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) {
(char *)&timeout,sizeof(timeout))) { (char *)&timeout,sizeof(timeout))) {
perror("[ETHERNET] setsockopt()"); perror("[ETHERNET] setsockopt()");
} else { } else {
printf( "receive timeout= %u usec\n",timeout.tv_usec); printf( "receive timeout= %u usec\n",(unsigned int)timeout.tv_usec);
} }
break; break;
...@@ -247,7 +247,7 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) { ...@@ -247,7 +247,7 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) {
(char *)&timeout,sizeof(timeout))) { (char *)&timeout,sizeof(timeout))) {
perror("[ETHERNET] setsockopt()"); perror("[ETHERNET] setsockopt()");
} else { } else {
printf( "send timeout= %d,%d sec\n",timeout.tv_sec,timeout.tv_usec); printf( "send timeout= %d,%d sec\n",(int)timeout.tv_sec,(int)timeout.tv_usec);
} }
break; break;
...@@ -307,7 +307,7 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) { ...@@ -307,7 +307,7 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) {
break; break;
case RING_PAR: case RING_PAR:
ret=snprintf(system_cmd,sizeof(system_cmd),"ethtool -G %s rx %d tx %d",eth->if_name[Mod_id],value); ret=snprintf(system_cmd,sizeof(system_cmd),"ethtool -G %s val %d",eth->if_name[Mod_id],value);
if (ret > 0) { if (ret > 0) {
ret=system(system_cmd); ret=system(system_cmd);
if (ret == -1) { if (ret == -1) {
...@@ -372,6 +372,9 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, eth ...@@ -372,6 +372,9 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, eth
} else if (eth->flags == ETH_RAW_IF4p5_MODE) { } else if (eth->flags == ETH_RAW_IF4p5_MODE) {
device->trx_write_func = trx_eth_write_raw_IF4p5; device->trx_write_func = trx_eth_write_raw_IF4p5;
device->trx_read_func = trx_eth_read_raw_IF4p5; device->trx_read_func = trx_eth_read_raw_IF4p5;
} else if (eth->flags == ETH_UDP_IF4p5_MODE) {
device->trx_write_func = trx_eth_write_udp_IF4p5;
device->trx_read_func = trx_eth_read_udp_IF4p5;
} else if (eth->flags == ETH_RAW_IF5_MOBIPASS) { } else if (eth->flags == ETH_RAW_IF5_MOBIPASS) {
device->trx_write_func = trx_eth_write_raw_IF4p5; device->trx_write_func = trx_eth_write_raw_IF4p5;
device->trx_read_func = trx_eth_read_raw_IF4p5; device->trx_read_func = trx_eth_read_raw_IF4p5;
...@@ -456,7 +459,7 @@ void dump_dev(openair0_device *device) { ...@@ -456,7 +459,7 @@ void dump_dev(openair0_device *device) {
device->openair0_cfg->num_rb_dl, device->openair0_cfg->sample_rate); device->openair0_cfg->num_rb_dl, device->openair0_cfg->sample_rate);
printf(" BBU configured for %i tx/%i rx channels)\n", printf(" BBU configured for %i tx/%i rx channels)\n",
device->openair0_cfg->tx_num_channels,device->openair0_cfg->rx_num_channels); device->openair0_cfg->tx_num_channels,device->openair0_cfg->rx_num_channels);
printf(" Running flags: %s %s %s\n", printf(" Running flags: %s %s (\n",
((eth->flags & ETH_RAW_MODE) ? "RAW socket mode - ":""), ((eth->flags & ETH_RAW_MODE) ? "RAW socket mode - ":""),
((eth->flags & ETH_UDP_MODE) ? "UDP socket mode - ":"")); ((eth->flags & ETH_UDP_MODE) ? "UDP socket mode - ":""));
printf(" Number of iqs dumped when displaying packets: %i\n\n",eth->iqdumpcnt); printf(" Number of iqs dumped when displaying packets: %i\n\n",eth->iqdumpcnt);
...@@ -466,14 +469,14 @@ void dump_dev(openair0_device *device) { ...@@ -466,14 +469,14 @@ void dump_dev(openair0_device *device) {
void inline dump_txcounters(openair0_device *device) { void inline dump_txcounters(openair0_device *device) {
eth_state_t *eth = (eth_state_t*)device->priv; eth_state_t *eth = (eth_state_t*)device->priv;
printf(" Ethernet device interface %i, tx counters:\n" ,device->openair0_cfg->Mod_id); printf(" Ethernet device interface %i, tx counters:\n" ,device->openair0_cfg->Mod_id);
printf(" Sent packets: %llu send errors: %i\n", eth->tx_count, eth->num_tx_errors); printf(" Sent packets: %llu send errors: %i\n", (long long unsigned int)eth->tx_count, eth->num_tx_errors);
} }
void inline dump_rxcounters(openair0_device *device) { void inline dump_rxcounters(openair0_device *device) {
eth_state_t *eth = (eth_state_t*)device->priv; eth_state_t *eth = (eth_state_t*)device->priv;
printf(" Ethernet device interface %i rx counters:\n" ,device->openair0_cfg->Mod_id); printf(" Ethernet device interface %i rx counters:\n" ,device->openair0_cfg->Mod_id);
printf(" Received packets: %llu missed packets errors: %i\n", eth->rx_count, eth->num_underflows); printf(" Received packets: %llu missed packets errors: %i\n", (long long unsigned int)eth->rx_count, eth->num_underflows);
} }
void inline dump_buff(openair0_device *device, char *buff,unsigned int tx_rx_flag, int nsamps) { void inline dump_buff(openair0_device *device, char *buff,unsigned int tx_rx_flag, int nsamps) {
......
...@@ -176,9 +176,10 @@ typedef struct { ...@@ -176,9 +176,10 @@ typedef struct {
void dump_packet(char *title, unsigned char* pkt, int bytes, unsigned int tx_rx_flag); void dump_packet(char *title, unsigned char* pkt, int bytes, unsigned int tx_rx_flag);
unsigned short calc_csum (unsigned short *buf, int nwords); unsigned short calc_csum (unsigned short *buf, int nwords);
void dump_dev(openair0_device *device); void dump_dev(openair0_device *device);
void inline dump_buff(openair0_device *device, char *buff,unsigned int tx_rx_flag,int nsamps); /*void inline dump_buff(openair0_device *device, char *buff,unsigned int tx_rx_flag,int nsamps);
void inline dump_rxcounters(openair0_device *device); void inline dump_rxcounters(openair0_device *device);
void inline dump_txcounters(openair0_device *device); void inline dump_txcounters(openair0_device *device);
*/
void dump_iqs(char * buff, int iq_cnt); void dump_iqs(char * buff, int iq_cnt);
...@@ -224,6 +225,8 @@ int trx_eth_write_raw(openair0_device *device, openair0_timestamp timestamp, voi ...@@ -224,6 +225,8 @@ int trx_eth_write_raw(openair0_device *device, openair0_timestamp timestamp, voi
int trx_eth_read_raw(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc); int trx_eth_read_raw(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc);
int trx_eth_write_raw_IF4p5(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int cc, int flags); int trx_eth_write_raw_IF4p5(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int cc, int flags);
int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc); int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc);
int trx_eth_write_udp_IF4p5(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int cc, int flags);
int trx_eth_read_udp_IF4p5(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc);
int eth_get_dev_conf_raw(openair0_device *device); int eth_get_dev_conf_raw(openair0_device *device);
int eth_set_dev_conf_raw(openair0_device *device); int eth_set_dev_conf_raw(openair0_device *device);
int eth_get_dev_conf_raw_IF4p5(openair0_device *device); int eth_get_dev_conf_raw_IF4p5(openair0_device *device);
......
...@@ -65,6 +65,9 @@ ...@@ -65,6 +65,9 @@
#define RAW_IF4p5_PDLFFT_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks)) #define RAW_IF4p5_PDLFFT_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define RAW_IF4p5_PULFFT_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks)) #define RAW_IF4p5_PULFFT_SIZE_BYTES(nblocks) (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define RAW_IF4p5_PRACH_SIZE_BYTES (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES) #define RAW_IF4p5_PRACH_SIZE_BYTES (MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES)
#define UDP_IF4p5_PDLFFT_SIZE_BYTES(nblocks) (sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks) (sizeof_IF4p5_header_t + DATA_BLOCK_SIZE_BYTES(nblocks))
#define UDP_IF4p5_PRACH_SIZE_BYTES (sizeof_IF4p5_header_t + PRACH_BLOCK_SIZE_BYTES)
// Mobipass packet sizes // Mobipass packet sizes
#define RAW_IF5_MOBIPASS_BLOCK_SIZE_BYTES 1280 #define RAW_IF5_MOBIPASS_BLOCK_SIZE_BYTES 1280
......
...@@ -501,6 +501,7 @@ int trx_exmimo_start(openair0_device *device) { ...@@ -501,6 +501,7 @@ int trx_exmimo_start(openair0_device *device) {
printf("Starting ...\n"); printf("Starting ...\n");
openair0_config(device->openair0_cfg,0); openair0_config(device->openair0_cfg,0);
openair0_start_rt_acquisition(0); openair0_start_rt_acquisition(0);
printf("Setting state to running\n");
exm->daq_state = running; exm->daq_state = running;
exm->wait_first_read = 1; exm->wait_first_read = 1;
return(0); return(0);
...@@ -508,7 +509,8 @@ int trx_exmimo_start(openair0_device *device) { ...@@ -508,7 +509,8 @@ int trx_exmimo_start(openair0_device *device) {
int trx_exmimo_write(openair0_device *device,openair0_timestamp ptimestamp, void **buff, int nsamps, int cc, int flags) { int trx_exmimo_write(openair0_device *device,openair0_timestamp ptimestamp, void **buff, int nsamps, int cc, int flags) {
return(0);
return(nsamps);
} }
...@@ -521,12 +523,12 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi ...@@ -521,12 +523,12 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi
struct timespec sleep_time; struct timespec sleep_time;
unsigned long tv_nsec; unsigned long tv_nsec;
int i; int i;
struct timespec wait;
int n,n1,n2,ntot,first_len; int n,n1,n2,ntot,first_len;
int ret; int ret;
wait.tv_sec=0; // struct timespec wait;
wait.tv_nsec=50000000L; // wait.tv_sec=0;
// wait.tv_nsec=50000000L;
if (exm->watchdog_exit == 1) if (exm->watchdog_exit == 1)
return(0); return(0);
...@@ -535,7 +537,6 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi ...@@ -535,7 +537,6 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi
tv_nsec=(unsigned long)((double)(nsamps)*1e9/cfg->sample_rate); tv_nsec=(unsigned long)((double)(nsamps)*1e9/cfg->sample_rate);
return(0); return(0);
} }
ret = pthread_mutex_timedlock(&exm->watchdog_mutex,&wait);
switch (ret) { switch (ret) {
...@@ -564,6 +565,9 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi ...@@ -564,6 +565,9 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi
return(0); return(0);
break; break;
} }
ret = pthread_mutex_lock(&exm->watchdog_mutex);
ts = exm->ts; ts = exm->ts;
if (exm->wait_first_read==1) { if (exm->wait_first_read==1) {
exm->wait_first_read=0; exm->wait_first_read=0;
...@@ -603,7 +607,7 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi ...@@ -603,7 +607,7 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi
printf("back\n"); printf("back\n");
#endif #endif
// get new timestamp, in case we have to sleep again // get new timestamp, in case we have to sleep again
pthread_mutex_timedlock(&exm->watchdog_mutex,&wait); pthread_mutex_lock(&exm->watchdog_mutex);
ts = exm->ts; ts = exm->ts;
pthread_mutex_unlock(&exm->watchdog_mutex); pthread_mutex_unlock(&exm->watchdog_mutex);
if (old_ts == ts) { if (old_ts == ts) {
...@@ -638,7 +642,7 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi ...@@ -638,7 +642,7 @@ int trx_exmimo_read(openair0_device *device, openair0_timestamp *ptimestamp, voi
} }
} }
} }
pthread_mutex_timedlock(&exm->watchdog_mutex,&wait); pthread_mutex_lock(&exm->watchdog_mutex);
exm->last_ts_rx += n; exm->last_ts_rx += n;
pthread_mutex_unlock(&exm->watchdog_mutex); pthread_mutex_unlock(&exm->watchdog_mutex);
if (n==n1) { if (n==n1) {
...@@ -712,6 +716,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) { ...@@ -712,6 +716,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
exmimo_id_t *p_exmimo_id; exmimo_id_t *p_exmimo_id;
int ret; int ret;
exmimo_state_t *exm = (exmimo_state_t *)malloc(sizeof(exmimo_state_t)); exmimo_state_t *exm = (exmimo_state_t *)malloc(sizeof(exmimo_state_t));
int card,ant;
ret = openair0_open(); ret = openair0_open();
...@@ -763,6 +768,13 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) { ...@@ -763,6 +768,13 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
device->priv = (void *)exm; device->priv = (void *)exm;
printf("EXMIMO2: Getting addresses for memory-mapped DMA\n");
for (card=0; card<openair0_num_detected_cards; card++) {
for (ant=0; ant<4; ant++) {
openair0_cfg[card].rxbase[ant] = (int32_t*)openair0_exmimo_pci[card].adc_head[ant];
openair0_cfg[card].txbase[ant] = (int32_t*)openair0_exmimo_pci[card].dac_head[ant];
}
}
create_watchdog(device); create_watchdog(device);
......
...@@ -23,6 +23,9 @@ eNBs = ...@@ -23,6 +23,9 @@ eNBs =
component_carriers = ( component_carriers = (
{ {
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "TDD"; frame_type = "TDD";
tdd_config = 3; tdd_config = 3;
tdd_config_s = 0; tdd_config_s = 0;
...@@ -35,8 +38,8 @@ eNBs = ...@@ -35,8 +38,8 @@ eNBs =
Nid_cell_mbsfn = 0; Nid_cell_mbsfn = 0;
nb_antennas_tx = 1; nb_antennas_tx = 1;
nb_antennas_rx = 1; nb_antennas_rx = 1;
tx_gain = 10; //25; tx_gain = 10;//25;
rx_gain = 10; //20; rx_gain = 120;
prach_root = 0; prach_root = 0;
prach_config_index = 0; prach_config_index = 0;
prach_high_speed = "DISABLE"; prach_high_speed = "DISABLE";
......
...@@ -23,6 +23,9 @@ eNBs = ...@@ -23,6 +23,9 @@ eNBs =
component_carriers = ( component_carriers = (
{ {
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD"; frame_type = "FDD";
tdd_config = 3; tdd_config = 3;
tdd_config_s = 0; tdd_config_s = 0;
......
...@@ -22,6 +22,9 @@ eNBs = ...@@ -22,6 +22,9 @@ eNBs =
component_carriers = ( component_carriers = (
{ {
node_function = "eNodeB_3GPP";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD"; frame_type = "FDD";
tdd_config = 3; tdd_config = 3;
tdd_config_s = 0; tdd_config_s = 0;
......
...@@ -134,7 +134,7 @@ eNBs = ...@@ -134,7 +134,7 @@ eNBs =
}; };
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.171"; mme_ip_address = ( { ipv4 = "127.0.0.3";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
active = "yes"; active = "yes";
preference = "ipv4"; preference = "ipv4";
...@@ -143,17 +143,17 @@ eNBs = ...@@ -143,17 +143,17 @@ eNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "eth2"; ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.80/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth2"; ENB_INTERFACE_NAME_FOR_S1U = "lo";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.80/24"; ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
log_config : log_config :
{ {
global_log_level ="debug"; global_log_level ="info";
global_log_verbosity ="medium"; global_log_verbosity ="medium";
hw_log_level ="info"; hw_log_level ="info";
hw_log_verbosity ="medium"; hw_log_verbosity ="medium";
......
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";
////////// Physical parameters:
component_carriers = (
{
node_function = "NGFI_RCC_IF4p5";
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 = 2660000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 125;
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 = -29;
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 = -96;
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;
}
);
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 = "lo";
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
rrh_gw_config = (
{
local_if_name = "eth0";
remote_address = "74:d4:35:cc:8d:15";
local_address = "34:e6:d7:3c:ae:fc";
local_port = 50000; #for raw option local port must be the same to remote
remote_port = 50000;
rrh_gw_active = "yes";
tr_preference = "raw_if4p5";
rf_preference = "usrp_b200";
iq_txshift = 4;
tx_sample_advance = 80;
tx_scheduling_advance = 9;
}
);
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";
};
}
);
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 = "NGFI_RRU_IF5";
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 = 2660000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 50;
Nid_cell_mbsfn = 0;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 125;
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 = -29;
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 = -96;
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;
}
);
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.11";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth3";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
rrh_gw_config = (
{
local_if_name = "eth0";
remote_address = "34:e6:d7:3c:ae:fc";
local_address = "74:d4:35:cc:8d:15";
local_port = 50000; #for raw option local port must be the same to remote
remote_port = 50000;
rrh_gw_active = "yes";
tr_preference = "raw_if5";
rf_preference = "usrp_b200";
iq_txshift = 4;
tx_sample_advance = 80;
tx_scheduling_advance = 9;
}
);
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";
};
}
);
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";
////////// Physical parameters:
component_carriers = (
{
node_function = "NGFI_RRU_IF4p5";
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 = 2660000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 125;
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 = -29;
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 = -96;
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;
}
);
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.11";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth3";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
rrh_gw_config = (
{
local_if_name = "eth0";
remote_address = "34:e6:d7:3c:ae:fc";
local_address = "74:d4:35:cc:8d:15";
local_port = 50000; #for raw option local port must be the same to remote
remote_port = 50000;
rrh_gw_active = "yes";
tr_preference = "raw_if4p5";
rf_preference = "usrp_b200";
iq_txshift = 4;
tx_sample_advance = 80;
tx_scheduling_advance = 9;
}
);
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";
};
}
);
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 = "NGFI_RRU_IF5";
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 = 2660000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 125;
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 = -29;
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 = -96;
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;
}
);
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.11";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth3";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
rrh_gw_config = (
{
local_if_name = "eth0";
remote_address = "34:e6:d7:3c:ae:fc";
local_address = "74:d4:35:cc:8d:15";
local_port = 50000; #for raw option local port must be the same to remote
remote_port = 50000;
rrh_gw_active = "yes";
tr_preference = "raw_if5";
rf_preference = "usrp_b200";
iq_txshift = 4;
tx_sample_advance = 80;
tx_scheduling_advance = 9;
}
);
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";
};
}
);
This diff is collapsed.
This diff is collapsed.
...@@ -104,7 +104,6 @@ extern int sync_var; ...@@ -104,7 +104,6 @@ extern int sync_var;
extern openair0_config_t openair0_cfg[MAX_CARDS]; extern openair0_config_t openair0_cfg[MAX_CARDS];
extern uint32_t downlink_frequency[MAX_NUM_CCs][4]; extern uint32_t downlink_frequency[MAX_NUM_CCs][4];
extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
extern openair0_rf_map rf_map[MAX_NUM_CCs];
extern int oai_exit; extern int oai_exit;
extern int32_t **rxdata; extern int32_t **rxdata;
...@@ -1559,56 +1558,59 @@ void fill_ue_band_info(void) ...@@ -1559,56 +1558,59 @@ void fill_ue_band_info(void)
} }
#endif #endif
int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg, openair0_rf_map rf_map[MAX_NUM_CCs]) int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg)
{ {
int i, CC_id; int i, CC_id;
LTE_DL_FRAME_PARMS *frame_parms; LTE_DL_FRAME_PARMS *frame_parms;
openair0_rf_map *rf_map;
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
if (phy_vars_ue[CC_id]) {
frame_parms = &(phy_vars_ue[CC_id]->frame_parms);
} else {
printf("phy_vars_UE[%d] not initialized\n", CC_id);
return(-1);
}
/* for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
if (frame_parms->frame_type == TDD) { rf_map = &phy_vars_ue[CC_id]->rf_map;
if (frame_parms->N_RB_DL == 100)
if (phy_vars_ue[CC_id]) {
frame_parms = &(phy_vars_ue[CC_id]->frame_parms);
} else {
printf("phy_vars_UE[%d] not initialized\n", CC_id);
return(-1);
}
/*
if (frame_parms->frame_type == TDD) {
if (frame_parms->N_RB_DL == 100)
N_TA_offset = 624; N_TA_offset = 624;
else if (frame_parms->N_RB_DL == 50) else if (frame_parms->N_RB_DL == 50)
N_TA_offset = 624/2; N_TA_offset = 624/2;
else if (frame_parms->N_RB_DL == 25) else if (frame_parms->N_RB_DL == 25)
N_TA_offset = 624/4; N_TA_offset = 624/4;
} }
*/ */
// replace RX signal buffers with mmaped HW versions // replace RX signal buffers with mmaped HW versions
rxdata = (int32_t**)malloc16( frame_parms->nb_antennas_rx*sizeof(int32_t*) ); rxdata = (int32_t**)malloc16( frame_parms->nb_antennas_rx*sizeof(int32_t*) );
txdata = (int32_t**)malloc16( frame_parms->nb_antennas_tx*sizeof(int32_t*) ); txdata = (int32_t**)malloc16( frame_parms->nb_antennas_tx*sizeof(int32_t*) );
for (i=0; i<frame_parms->nb_antennas_rx; i++) { for (i=0; i<frame_parms->nb_antennas_rx; i++) {
printf( "Mapping UE CC_id %d, rx_ant %d, freq %u on card %d, chain %d\n", CC_id, i, downlink_frequency[CC_id][i], rf_map[CC_id].card, rf_map[CC_id].chain+i ); printf( "Mapping UE CC_id %d, rx_ant %d, freq %u on card %d, chain %d\n", CC_id, i, downlink_frequency[CC_id][i], rf_map->card, rf_map->chain+i );
free( phy_vars_ue[CC_id]->common_vars.rxdata[i] ); free( phy_vars_ue[CC_id]->common_vars.rxdata[i] );
rxdata[i] = (int32_t*)malloc16_clear( 307200*sizeof(int32_t) ); rxdata[i] = (int32_t*)malloc16_clear( 307200*sizeof(int32_t) );
phy_vars_ue[CC_id]->common_vars.rxdata[i] = rxdata[i]; // what about the "-N_TA_offset" ? // N_TA offset for TDD phy_vars_ue[CC_id]->common_vars.rxdata[i] = rxdata[i]; // what about the "-N_TA_offset" ? // N_TA offset for TDD
printf("rxdata[%d] : %p\n",i,rxdata[i]); printf("rxdata[%d] : %p\n",i,rxdata[i]);
} }
for (i=0; i<frame_parms->nb_antennas_tx; i++) { for (i=0; i<frame_parms->nb_antennas_tx; i++) {
printf( "Mapping UE CC_id %d, tx_ant %d, freq %u on card %d, chain %d\n", CC_id, i, downlink_frequency[CC_id][i], rf_map[CC_id].card, rf_map[CC_id].chain+i ); printf( "Mapping UE CC_id %d, tx_ant %d, freq %u on card %d, chain %d\n", CC_id, i, downlink_frequency[CC_id][i], rf_map->card, rf_map->chain+i );
free( phy_vars_ue[CC_id]->common_vars.txdata[i] ); free( phy_vars_ue[CC_id]->common_vars.txdata[i] );
txdata[i] = (int32_t*)malloc16_clear( 307200*sizeof(int32_t) ); txdata[i] = (int32_t*)malloc16_clear( 307200*sizeof(int32_t) );
phy_vars_ue[CC_id]->common_vars.txdata[i] = txdata[i]; phy_vars_ue[CC_id]->common_vars.txdata[i] = txdata[i];
printf("txdata[%d] : %p\n",i,txdata[i]); printf("txdata[%d] : %p\n",i,txdata[i]);
} }
// rxdata[x] points now to the same memory region as phy_vars_ue[CC_id]->common_vars.rxdata[x] // rxdata[x] points now to the same memory region as phy_vars_ue[CC_id]->common_vars.rxdata[x]
// txdata[x] points now to the same memory region as phy_vars_ue[CC_id]->common_vars.txdata[x] // txdata[x] points now to the same memory region as phy_vars_ue[CC_id]->common_vars.txdata[x]
// be careful when releasing memory! // be careful when releasing memory!
// because no "release_ue_buffers"-function is available, at least rxdata and txdata memory will leak (only some bytes) // because no "release_ue_buffers"-function is available, at least rxdata and txdata memory will leak (only some bytes)
} }
return 0; return 0;
......
...@@ -70,6 +70,7 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -70,6 +70,7 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
NUMBER_OF_UE_MAX, NUMBER_OF_eNB_MAX, NUMBER_OF_HARQ_PID_MAX); NUMBER_OF_UE_MAX, NUMBER_OF_eNB_MAX, NUMBER_OF_HARQ_PID_MAX);
LOG_I(PHY,"init eNB: N_RB_DL %d\n", frame_parms->N_RB_DL); LOG_I(PHY,"init eNB: N_RB_DL %d\n", frame_parms->N_RB_DL);
LOG_I(PHY,"init eNB: Transmission mode %d\n", transmission_mode); LOG_I(PHY,"init eNB: Transmission mode %d\n", transmission_mode);
LOG_I(PHY,"init eNB: prach_config_index %d\n", frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex);
for (i=0; i<NUMBER_OF_UE_MAX; i++) { for (i=0; i<NUMBER_OF_UE_MAX; i++) {
for (j=0; j<2; j++) { for (j=0; j<2; j++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment