Commit cd22e926 authored by knopp's avatar knopp
Browse files

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

Merge branch 'enhancement-10-harmony' of https://gitlab.eurecom.fr/oai/openairinterface5g into enhancement-10-harmony
parents 1f771421 6599d1c9
......@@ -313,7 +313,7 @@ def SSHSessionWrapper(machine, username, key_file, password, logdir_remote, logd
# \param CleanUpAluLteBox program to terminate AlU Bell Labs LTE Box
# \param ExmimoRfStop String to stop EXMIMO card (specified in test_case_list.xml)
def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop, logdir, logdirOAI5GRepo):
cmd = 'sudo -E killall -9 -q -r ' + programList
cmd = 'sudo -E killall -s INT -q -r ' + programList + ' ; sleep 5 ; sudo -E killall -9 -q -r ' + programList
result = oai.send(cmd, True)
print "Killing old programs..." + result
programArray = programList.split()
......
This diff is collapsed.
......@@ -73,7 +73,7 @@ def start_ue () :
time.sleep ( 2)
#Now we check if ppp0 interface is up and running
try:
cmd = 'sudo adb -s ' + device_id + ' shell netcfg |grep 192.'
cmd = 'sudo adb -s ' + device_id + ' shell netcfg |grep UP'
status, out = commands.getstatusoutput(cmd)
if (out == '') :
print "Waiting for UE to connect and get IP Address..."
......
......@@ -31,6 +31,26 @@
# \author Navid Nikaein, Rohit Gupta
# To free unused memory else test setup runs out of memory
sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches '
mem_threshold=0.2 #If free memory is less than this threshold, then VM drop cache is called
mem_tot=`vmstat -s -S k |grep "total memory" | awk '{print $1}'`
mem_free=`vmstat -s -S k |grep "free memory" | awk '{print $1}'`
mem_frac=`bc <<< "scale=4;$mem_free/$mem_tot"`
echo $mem_frac
#mem_frac=`bc <<< "scale=4;`echo $mem_free`/`echo $mem_tot`"`
echo "Total Memory = $mem_tot k "
echo "Free Memory = $mem_free k"
echo "Fraction free memory = $mem_frac "
res=`bc <<< "$mem_frac < 0.2" `
echo "Comparison Result = $res"
if [ "$res" == "1" ]
then
echo "Free memory less than threshold = $mem_threshold"
sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches '
fi
......@@ -48,7 +48,7 @@ PRINT_STATS="False"
VCD_TIMING="False"
DEADLINE_SCHEDULER_FLAG_USER="False"
FORCE_DEADLINE_SCHEDULER_FLAG_USER=""
CPU_AFFINITY_FLAG_USER="True" #Only valid when lowlatecy flag is set to False
CPU_AFFINITY_FLAG_USER="False" #Only valid when lowlatecy flag is set to False
REL="Rel10"
HW="None"
TP="None"
......@@ -330,9 +330,9 @@ function main() {
#By default: EXMIMO: enable
if [ "$FORCE_DEADLINE_SCHEDULER_FLAG_USER" = "" ]; then
if [ "$HW" = "EXMIMO" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="True"
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "ETHERNET" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="True"
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_USRP" ] ; then
DEADLINE_SCHEDULER_FLAG_USER="False"
elif [ "$HW" = "OAI_BLADERF" ] ; then
......
......@@ -284,7 +284,9 @@ check_install_additional_tools (){
wvdial \
python-numpy \
sshpass \
nscd
nscd \
bc \
ntp
$SUDO pip install paramiko
$SUDO pip install pyroute2
......
......@@ -875,7 +875,7 @@ typedef struct {
void exit_fun(const char* s);
inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
......@@ -897,7 +897,7 @@ inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *in
return(0);
}
inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
static inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
......@@ -919,7 +919,7 @@ inline int wait_on_busy_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,in
return(0);
}
inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *name) {
static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
......
......@@ -736,14 +736,8 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
#endif
if (abstraction_flag == 0) {
LOG_I(PHY,"[UE %d][RAPROC] Frame %d, Subframe %d : Generating PRACH, preamble %d, TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d\n",
ue->Mod_id,
frame_tx,
subframe_tx,
ue->prach_resources[eNB_id]->ra_PreambleIndex,
ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER,
ue->prach_resources[eNB_id]->ra_TDD_map_index,
ue->prach_resources[eNB_id]->ra_RNTI);
LOG_I(PHY,"mode %d\n",mode);
if ((ue->mac_enabled==1) && (mode != calib_prach_tx)) {
ue->tx_power_dBm[subframe_tx] = ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER+get_PL(ue->Mod_id,ue->CC_id,eNB_id);
......@@ -753,6 +747,15 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->prach_resources[eNB_id]->ra_PreambleIndex = 19;
}
LOG_I(PHY,"[UE %d][RAPROC] Frame %d, Subframe %d : Generating PRACH, preamble %d, TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d\n",
ue->Mod_id,
frame_tx,
subframe_tx,
ue->prach_resources[eNB_id]->ra_PreambleIndex,
ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER,
ue->prach_resources[eNB_id]->ra_TDD_map_index,
ue->prach_resources[eNB_id]->ra_RNTI);
ue->tx_total_RE[subframe_tx] = 96;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
......
......@@ -353,8 +353,8 @@ int main(int argc, char **argv)
eNB2->frame_parms.nushift=(Nid_cell+2)%6;
eNB2->Mod_id=2;
phy_init_lte_eNB(eNB1,0,0,0);
phy_init_lte_eNB(eNB2,0,0,0);
phy_init_lte_eNB(eNB1,0,0);
phy_init_lte_eNB(eNB2,0,0);
#ifdef XFORMS
fl_initialize (&argc, argv, NULL, 0, 0);
......
......@@ -902,8 +902,8 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
brf_state_t *brf = (brf_state_t*)malloc(sizeof(brf_state_t));
memset(brf, 0, sizeof(brf_state_t));
/* device specific */
openair0_cfg->txlaunch_wait = 1;//manage when TX processing is triggered
openair0_cfg->txlaunch_wait_slotcount = 1; //manage when TX processing is triggered
//openair0_cfg->txlaunch_wait = 1;//manage when TX processing is triggered
//openair0_cfg->txlaunch_wait_slotcount = 1; //manage when TX processing is triggered
openair0_cfg->iq_txshift = 0;// shift
openair0_cfg->iq_rxrescale = 15;//rescale iqs
......@@ -912,22 +912,18 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
case 30720000:
openair0_cfg->samples_per_packet = 2048;
openair0_cfg->tx_sample_advance = 0;
openair0_cfg->tx_scheduling_advance = 8*openair0_cfg->samples_per_packet;
break;
case 15360000:
openair0_cfg->samples_per_packet = 2048;
openair0_cfg->tx_sample_advance = 0;
openair0_cfg->tx_scheduling_advance = 4*openair0_cfg->samples_per_packet;
break;
case 7680000:
openair0_cfg->samples_per_packet = 1024;
openair0_cfg->tx_sample_advance = 0;
openair0_cfg->tx_scheduling_advance = 4*openair0_cfg->samples_per_packet;
break;
case 1920000:
openair0_cfg->samples_per_packet = 256;
openair0_cfg->tx_sample_advance = 50;
openair0_cfg->tx_scheduling_advance = 8*openair0_cfg->samples_per_packet;
break;
default:
printf("Error: unknown sampling rate %f\n",openair0_cfg->sample_rate);
......
......@@ -774,6 +774,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
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];
}
openair0_cfg[card].mmapped_dma = 1;
}
create_watchdog(device);
......
......@@ -36,6 +36,7 @@
#include <octave/oct.h>
#include "pcie_interface.h"
#include "oarf.h"
extern "C" {
#include "openair0_lib.h"
......
......@@ -42,6 +42,7 @@
extern "C" {
#include "openair0_lib.h"
}
#include "oarf.h"
#define FCNNAME "oarf_get_frame"
......
......@@ -39,6 +39,7 @@
extern "C" {
#include "openair0_lib.h"
}
#include "oarf.h"
#define FCNNAME "oarf_get_num_detected_cards"
......
......@@ -41,6 +41,7 @@
extern "C" {
#include "openair0_lib.h"
}
#include "oarf.h"
#define FCNNAME "oarf_send_frame"
......
......@@ -40,6 +40,7 @@
extern "C" {
#include "openair0_lib.h"
}
#include "oarf.h"
#define FCNNAME "oarf_stop"
......
......@@ -39,6 +39,7 @@
extern "C" {
#include "openair0_lib.h"
}
#include "oarf.h"
#define FCNNAME "oarf_stop_without_reset"
......
fc = 1907600000;
fc = 2560000000
%fc = 1907600000;
%fc = 859.5e6;
......@@ -6,7 +6,7 @@ rxgain=0;
txgain=0;
eNB_flag = 0;
card = 0;
active_rf = [1 1 1 1];
active_rf = [1 0 0 0];
autocal = [1 1 1 1];
resampling_factor = [2 2 2 2];
limeparms;
......
......@@ -324,7 +324,7 @@ int trx_lms_start(openair0_device *device){
* \param card Index of the RF card to use
* \returns 0 on success
*/
int trx_lms_stop(int card) {
int trx_lms_stop(openair0_device *device) {
/*
LMS_DeviceClose(usbport);
LMS_DeviceClose(comport);
......@@ -410,28 +410,24 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg){
openair0_cfg[0].tx_sample_advance = 15;
openair0_cfg[0].tx_bw = 30.72e6;
openair0_cfg[0].rx_bw = 30.72e6;
openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet;
break;
case 15360000:
openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg[0].tx_sample_advance = 45;
openair0_cfg[0].tx_bw = 28e6;
openair0_cfg[0].rx_bw = 10e6;
openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet;
break;
case 7680000:
openair0_cfg[0].samples_per_packet = 1024;
openair0_cfg[0].tx_sample_advance = 70;
openair0_cfg[0].tx_bw = 28e6;
openair0_cfg[0].rx_bw = 5.0e6;
openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet;
break;
case 1920000:
openair0_cfg[0].samples_per_packet = 256;
openair0_cfg[0].tx_sample_advance = 50;
openair0_cfg[0].tx_bw = 1.25e6;
openair0_cfg[0].rx_bw = 1.25e6;
openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet;
break;
default:
printf("Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate);
......
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