Commit 33d9e8f2 authored by Aikaterini's avatar Aikaterini

Merge branch 'develop' into bugfix-48-L1L2signaling

parents cac00e34 eb48479b
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
cmake_minimum_required(VERSION 2.8)
set(ENABLE_VCD_FIFO False )
set(ENABLE_ITTI False )
set(RF_BOARD "ETHERNET")
set(PACKAGE_NAME "\"rrh_gw\"")
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
...@@ -180,7 +180,7 @@ check_install_bladerf_driver(){ ...@@ -180,7 +180,7 @@ check_install_bladerf_driver(){
$SUDO apt-get install -y bladerf libbladerf-dev $SUDO apt-get install -y bladerf libbladerf-dev
$SUDO apt-get install -y bladerf-firmware-fx3 $SUDO apt-get install -y bladerf-firmware-fx3
$SUDO apt-get install -y bladerf-fpga-hostedx40 $SUDO apt-get install -y bladerf-fpga-hostedx40
bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img $SUDO bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img
} }
check_install_additional_tools (){ check_install_additional_tools (){
...@@ -380,3 +380,21 @@ done ...@@ -380,3 +380,21 @@ done
} }
# get from http://www.linuxjournal.com/content/validating-ip-address-bash-script
validate_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
}
\ No newline at end of file
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
short primary_synch0[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-26120,-19785,11971,-30502,-24020,-22288,32117,6492,31311,9658,-16384,-28378,25100,-21063,-7292,-31946,20429,25618,14948,29158,11971,-30502,31311,9658,25100,-21063,-16384,28377,-24020,22287,32117,6492,-7292,31945,20429,25618,-26120,-19785,-16384,-28378,-16384,28377,-26120,-19785,-32402,4883,31311,-9659,32117,6492,-7292,-31946,32767,-1,25100,-21063,-24020,22287,-32402,4883,-32402,4883,-24020,22287,25100,-21063,32767,-1,-7292,-31946,32117,6492,31311,-9659,-32402,4883,-26120,-19785,-16384,28377,-16384,-28378,-26120,-19785,20429,25618,-7292,31945,32117,6492,-24020,22287,-16384,28377,25100,-21063,31311,9658,11971,-30502,14948,29158,20429,25618,-7292,-31946,25100,-21063,-16384,-28378,31311,9658,32117,6492,-24020,-22288,11971,-30502,-26120,-19785,32767,0,0,0,0,0,0,0,0,0,0,0}; short primary_synch0[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-26120,-19785,11971,-30502,-24020,-22288,32117,6492,31311,9658,-16384,-28378,25100,-21063,-7292,-31946,20429,25618,14948,29158,11971,-30502,31311,9658,25100,-21063,-16384,28377,-24020,22287,32117,6492,-7292,31945,20429,25618,-26120,-19785,-16384,-28378,-16384,28377,-26120,-19785,-32402,4883,31311,-9659,32117,6492,-7292,-31946,32767,-1,25100,-21063,-24020,22287,-32402,4883,-32402,4883,-24020,22287,25100,-21063,32767,-1,-7292,-31946,32117,6492,31311,-9659,-32402,4883,-26120,-19785,-16384,28377,-16384,-28378,-26120,-19785,20429,25618,-7292,31945,32117,6492,-24020,22287,-16384,28377,25100,-21063,31311,9658,11971,-30502,14948,29158,20429,25618,-7292,-31946,25100,-21063,-16384,-28378,31311,9658,32117,6492,-24020,-22288,11971,-30502,-26120,-19785,32767,0,0,0,0,0,0,0,0,0,0,0};
short primary_synch1[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-31754,-8086,-24020,-22288,2448,32675,-26120,19784,27073,18458,-16384,28377,25100,21062,-29523,14217,-7292,31945,-13477,-29868,-24020,-22288,27073,18458,25100,21062,-16384,-28378,2448,-32676,-26120,19784,-29523,-14218,-7292,31945,-31754,-8086,-16384,28377,-16384,-28378,-31754,-8086,31311,-9659,27073,-18459,-26120,19784,-29523,14217,32767,-1,25100,21062,2448,-32676,31311,-9659,31311,-9659,2448,-32676,25100,21062,32767,0,-29523,14217,-26120,19784,27073,-18459,31311,-9659,-31754,-8086,-16384,-28378,-16384,28377,-31754,-8086,-7292,31945,-29523,-14218,-26120,19784,2448,-32676,-16384,-28378,25100,21062,27073,18458,-24020,-22288,-13477,-29868,-7292,31945,-29523,14217,25100,21062,-16384,28377,27073,18458,-26120,19784,2448,32675,-24020,-22288,-31754,-8086,32767,0,0,0,0,0,0,0,0,0,0,0}; short primary_synch1[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-31754,-8086,-24020,-22288,2448,32675,-26120,19784,27073,18458,-16384,28377,25100,21062,-29523,14217,-7292,31945,-13477,-29868,-24020,-22288,27073,18458,25100,21062,-16384,-28378,2448,-32676,-26120,19784,-29523,-14218,-7292,31945,-31754,-8086,-16384,28377,-16384,-28378,-31754,-8086,31311,-9659,27073,-18459,-26120,19784,-29523,14217,32767,-1,25100,21062,2448,-32676,31311,-9659,31311,-9659,2448,-32676,25100,21062,32767,0,-29523,14217,-26120,19784,27073,-18459,31311,-9659,-31754,-8086,-16384,-28378,-16384,28377,-31754,-8086,-7292,31945,-29523,-14218,-26120,19784,2448,-32676,-16384,-28378,25100,21062,27073,18458,-24020,-22288,-13477,-29868,-7292,31945,-29523,14217,25100,21062,-16384,28377,27073,18458,-26120,19784,2448,32675,-24020,-22288,-31754,-8086,32767,0,0,0,0,0,0,0,0,0,0,0};
short primary_synch2[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-31754,8085,-24020,22287,2448,-32676,-26120,-19785,27073,-18459,-16384,-28378,25100,-21063,-29523,-14218,-7292,-31946,-13477,29867,-24020,22287,27073,-18459,25100,-21063,-16384,28377,2448,32675,-26120,-19785,-29523,14217,-7292,-31946,-31754,8085,-16384,-28378,-16384,28377,-31754,8085,31311,9658,27073,18458,-26120,-19785,-29523,-14218,32767,0,25100,-21063,2448,32675,31311,9658,31311,9658,2448,32675,25100,-21063,32767,0,-29523,-14218,-26120,-19785,27073,18458,31311,9658,-31754,8085,-16384,28377,-16384,-28378,-31754,8085,-7292,-31946,-29523,14217,-26120,-19785,2448,32675,-16384,28377,25100,-21063,27073,-18459,-24020,22287,-13477,29867,-7292,-31946,-29523,-14218,25100,-21063,-16384,-28378,27073,-18459,-26120,-19785,2448,-32676,-24020,22287,-31754,8085,32767,-1,0,0,0,0,0,0,0,0,0,0}; short primary_synch2[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-31754,8085,-24020,22287,2448,-32676,-26120,-19785,27073,-18459,-16384,-28378,25100,-21063,-29523,-14218,-7292,-31946,-13477,29867,-24020,22287,27073,-18459,25100,-21063,-16384,28377,2448,32675,-26120,-19785,-29523,14217,-7292,-31946,-31754,8085,-16384,-28378,-16384,28377,-31754,8085,31311,9658,27073,18458,-26120,-19785,-29523,-14218,32767,0,25100,-21063,2448,32675,31311,9658,31311,9658,2448,32675,25100,-21063,32767,0,-29523,-14218,-26120,-19785,27073,18458,31311,9658,-31754,8085,-16384,28377,-16384,-28378,-31754,8085,-7292,-31946,-29523,14217,-26120,-19785,2448,32675,-16384,28377,25100,-21063,27073,-18459,-24020,22287,-13477,29867,-7292,-31946,-29523,-14218,25100,-21063,-16384,-28378,27073,-18459,-26120,-19785,2448,-32676,-24020,22287,-31754,8085,32767,-1,0,0,0,0,0,0,0,0,0,0};
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#include "gain_control.h" #include "gain_control.h"
#endif #endif
#if defined(OAI_USRP) || defined(EXMIMO) #if defined(OAI_USRP) || defined(EXMIMO) || defined(OAI_LMSSDR)
#include "common_lib.h" #include "common_lib.h"
extern openair0_config_t openair0_cfg[]; extern openair0_config_t openair0_cfg[];
#endif #endif
...@@ -291,17 +291,10 @@ int initial_sync(PHY_VARS_UE *phy_vars_ue, runmode_t mode) ...@@ -291,17 +291,10 @@ int initial_sync(PHY_VARS_UE *phy_vars_ue, runmode_t mode)
frame_parms->Ncp=NORMAL; frame_parms->Ncp=NORMAL;
frame_parms->frame_type=FDD; frame_parms->frame_type=FDD;
init_frame_parms(frame_parms,1); init_frame_parms(frame_parms,1);
/*
// write_output("rxdata0.m","rxd0",phy_vars_ue->lte_ue_common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1); write_output("rxdata0.m","rxd0",phy_vars_ue->lte_ue_common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
exit(-1);
/*#ifdef OAI_USRP */
for (aarx = 0; aarx<frame_parms->nb_antennas_rx;aarx++) {
rxdata128 = (__m128i*)phy_vars_ue->lte_ue_common_vars.rxdata[aarx];
for (i=0; i<(frame_parms->samples_per_tti*10)>>2; i++) {
rxdata128[i] = _mm_srai_epi16(rxdata128[i],4);
}
}
#endif*/
sync_pos = lte_sync_time(phy_vars_ue->lte_ue_common_vars.rxdata, sync_pos = lte_sync_time(phy_vars_ue->lte_ue_common_vars.rxdata,
frame_parms, frame_parms,
(int *)&phy_vars_ue->lte_ue_common_vars.eNb_id); (int *)&phy_vars_ue->lte_ue_common_vars.eNb_id);
...@@ -336,9 +329,11 @@ int initial_sync(PHY_VARS_UE *phy_vars_ue, runmode_t mode) ...@@ -336,9 +329,11 @@ int initial_sync(PHY_VARS_UE *phy_vars_ue, runmode_t mode)
#else #else
#ifndef OAI_USRP #ifndef OAI_USRP
#ifndef OAI_BLADERF #ifndef OAI_BLADERF
#ifndef OAI_LMSSDR
phy_adjust_gain(phy_vars_ue,0); phy_adjust_gain(phy_vars_ue,0);
#endif #endif
#endif
#endif #endif
#endif #endif
...@@ -569,7 +564,7 @@ int initial_sync(PHY_VARS_UE *phy_vars_ue, runmode_t mode) ...@@ -569,7 +564,7 @@ int initial_sync(PHY_VARS_UE *phy_vars_ue, runmode_t mode)
phy_vars_ue->lte_frame_parms.phich_config_common.phich_duration, phy_vars_ue->lte_frame_parms.phich_config_common.phich_duration,
phich_string[phy_vars_ue->lte_frame_parms.phich_config_common.phich_resource], phich_string[phy_vars_ue->lte_frame_parms.phich_config_common.phich_resource],
phy_vars_ue->lte_frame_parms.nb_antennas_tx_eNB); phy_vars_ue->lte_frame_parms.nb_antennas_tx_eNB);
#if defined(OAI_USRP) || defined(EXMIMO) #if defined(OAI_USRP) || defined(EXMIMO) || defined(OAI_LMSSDR)
LOG_I(PHY,"[UE %d] Frame %d Measured Carrier Frequency %.0f Hz (offset %d Hz)\n", LOG_I(PHY,"[UE %d] Frame %d Measured Carrier Frequency %.0f Hz (offset %d Hz)\n",
phy_vars_ue->Mod_id, phy_vars_ue->Mod_id,
phy_vars_ue->frame_rx, phy_vars_ue->frame_rx,
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#endif #endif
extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index); extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index);
#if defined(OAI_USRP) || defined(EXMIMO) || defined(OAI_BLADERF) #if defined(OAI_USRP) || defined(EXMIMO) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
#include "common_lib.h" #include "common_lib.h"
extern openair0_config_t openair0_cfg[]; extern openair0_config_t openair0_cfg[];
#endif #endif
...@@ -97,10 +97,10 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t ...@@ -97,10 +97,10 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t
#ifdef EXMIMO #ifdef EXMIMO
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB (LNA %d, vga %d dB)\n",phy_vars_ue->rx_total_gain_dB, openair0_cfg[0].rxg_mode[0],(int)openair0_cfg[0].rx_gain[0]); len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB (LNA %d, vga %d dB)\n",phy_vars_ue->rx_total_gain_dB, openair0_cfg[0].rxg_mode[0],(int)openair0_cfg[0].rx_gain[0]);
#endif #endif
#if defined(OAI_USRP) || defined(OAI_BLADERF) #if defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB\n",phy_vars_ue->rx_total_gain_dB); len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB\n",phy_vars_ue->rx_total_gain_dB);
#endif #endif
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz (%d), estimated carrier frequency %f Hz\n",phy_vars_ue->lte_ue_common_vars.freq_offset,openair_daq_vars.freq_offset,openair0_cfg[0].rx_freq[0]-phy_vars_ue->lte_ue_common_vars.freq_offset); len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz (%d), estimated carrier frequency %f Hz\n",phy_vars_ue->lte_ue_common_vars.freq_offset,openair_daq_vars.freq_offset,openair0_cfg[0].rx_freq[0]-phy_vars_ue->lte_ue_common_vars.freq_offset);
#endif #endif
len += sprintf(&buffer[len], "[UE PROC] UE mode = %s (%d)\n",mode_string[phy_vars_ue->UE_mode[0]],phy_vars_ue->UE_mode[0]); len += sprintf(&buffer[len], "[UE PROC] UE mode = %s (%d)\n",mode_string[phy_vars_ue->UE_mode[0]],phy_vars_ue->UE_mode[0]);
......
...@@ -88,7 +88,7 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void ) ...@@ -88,7 +88,7 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
fl_set_object_boxtype( fdui->rxsig_t, FL_EMBOSSED_BOX ); fl_set_object_boxtype( fdui->rxsig_t, FL_EMBOSSED_BOX );
fl_set_object_color( fdui->rxsig_t, FL_BLACK, FL_RED ); fl_set_object_color( fdui->rxsig_t, FL_BLACK, FL_RED );
fl_set_object_lcolor( fdui->rxsig_t, FL_WHITE ); // Label color fl_set_object_lcolor( fdui->rxsig_t, FL_WHITE ); // Label color
fl_set_xyplot_ybounds(fdui->rxsig_t,30,70); fl_set_xyplot_ybounds(fdui->rxsig_t,10,70);
// Time-domain channel response // Time-domain channel response
fdui->chest_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 410, 20, 370, 100, "Channel Impulse Response (samples, abs)" ); fdui->chest_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 410, 20, 370, 100, "Channel Impulse Response (samples, abs)" );
...@@ -396,7 +396,7 @@ FD_lte_phy_scope_ue *create_lte_phy_scope_ue( void ) ...@@ -396,7 +396,7 @@ FD_lte_phy_scope_ue *create_lte_phy_scope_ue( void )
fl_set_object_boxtype( fdui->rxsig_t, FL_EMBOSSED_BOX ); fl_set_object_boxtype( fdui->rxsig_t, FL_EMBOSSED_BOX );
fl_set_object_color( fdui->rxsig_t, FL_BLACK, FL_RED ); fl_set_object_color( fdui->rxsig_t, FL_BLACK, FL_RED );
fl_set_object_lcolor( fdui->rxsig_t, FL_WHITE ); // Label color fl_set_object_lcolor( fdui->rxsig_t, FL_WHITE ); // Label color
fl_set_xyplot_ybounds(fdui->rxsig_t,30,70); fl_set_xyplot_ybounds(fdui->rxsig_t,10,70);
// Time-domain channel response // Time-domain channel response
fdui->chest_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 410, 20, 370, 100, "Channel Impulse Response (samples, abs)" ); fdui->chest_t = fl_add_xyplot( FL_NORMAL_XYPLOT, 410, 20, 370, 100, "Channel Impulse Response (samples, abs)" );
......
...@@ -76,6 +76,13 @@ ...@@ -76,6 +76,13 @@
#define openair_free(y,x) free((y)) #define openair_free(y,x) free((y))
#define PAGE_SIZE 4096 #define PAGE_SIZE 4096
//#ifdef SHRLIBDEV
//extern int rxrescale;
//#define RX_IQRESCALELEN rxrescale
//#else
//#define RX_IQRESCALELEN 15
//#endif
//! \brief Allocate \c size bytes of memory on the heap with alignment 16 and zero it afterwards. //! \brief Allocate \c size bytes of memory on the heap with alignment 16 and zero it afterwards.
//! If no more memory is available, this function will terminate the program with an assertion error. //! If no more memory is available, this function will terminate the program with an assertion error.
static inline void* malloc16_clear( size_t size ) static inline void* malloc16_clear( size_t size )
......
...@@ -44,7 +44,14 @@ ...@@ -44,7 +44,14 @@
/** @defgroup _ref_implementation_ OpenAirInterface LTE Implementation /** @defgroup _ref_implementation_ OpenAirInterface LTE Implementation
* @{ * @{
* @defgroup _PHY_RF_INTERFACE_ Generic PHY - RF Interface * @defgroup _PHY_RF_INTERFACE_ PHY - RF Interface
* @ingroup _PHY_RF_INTERFACE_
* @{
* @defgroup _GENERIC_PHY_RF_INTERFACE_ Generic PHY - RF Interface
* @defgroup _USRP_PHY_RF_INTERFACE_ PHY - USRP RF Interface
* @defgroup _BLADERF_PHY_RF_INTERFACE_ PHY - BLADERF RF Interface
* @}
*
* @ingroup _ref_implementation_ * @ingroup _ref_implementation_
* @{ * @{
* This module is responsible for defining the generic interface between PHY and RF Target * This module is responsible for defining the generic interface between PHY and RF Target
......
...@@ -121,7 +121,7 @@ extern int rx_sig_fifo; ...@@ -121,7 +121,7 @@ extern int rx_sig_fifo;
#endif #endif
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
extern uint32_t downlink_frequency[MAX_NUM_CCs][4]; extern uint32_t downlink_frequency[MAX_NUM_CCs][4];
#endif #endif
...@@ -197,7 +197,7 @@ void dump_dlsch_SI(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe) ...@@ -197,7 +197,7 @@ void dump_dlsch_SI(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe)
exit(-1); exit(-1);
} }
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
//unsigned int gain_table[31] = {100,112,126,141,158,178,200,224,251,282,316,359,398,447,501,562,631,708,794,891,1000,1122,1258,1412,1585,1778,1995,2239,2512,2818,3162}; //unsigned int gain_table[31] = {100,112,126,141,158,178,200,224,251,282,316,359,398,447,501,562,631,708,794,891,1000,1122,1258,1412,1585,1778,1995,2239,2512,2818,3162};
/* /*
unsigned int get_tx_amp_prach(int power_dBm, int power_max_dBm, int N_RB_UL) unsigned int get_tx_amp_prach(int power_dBm, int power_max_dBm, int N_RB_UL)
...@@ -669,7 +669,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra ...@@ -669,7 +669,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
uint8_t ack_status=0; uint8_t ack_status=0;
int8_t Po_PUCCH; int8_t Po_PUCCH;
int32_t ulsch_start=0; int32_t ulsch_start=0;
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
int overflow=0; int overflow=0;
int k,l; int k,l;
#endif #endif
...@@ -969,7 +969,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra ...@@ -969,7 +969,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
#endif #endif
phy_vars_ue->tx_total_RE = nb_rb*12; phy_vars_ue->tx_total_RE = nb_rb*12;
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
tx_amp = get_tx_amp(phy_vars_ue->tx_power_dBm, tx_amp = get_tx_amp(phy_vars_ue->tx_power_dBm,
phy_vars_ue->tx_power_max_dBm, phy_vars_ue->tx_power_max_dBm,
phy_vars_ue->lte_frame_parms.N_RB_UL, phy_vars_ue->lte_frame_parms.N_RB_UL,
...@@ -1065,7 +1065,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra ...@@ -1065,7 +1065,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
#endif #endif
phy_vars_ue->tx_total_RE = 12; phy_vars_ue->tx_total_RE = 12;
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
tx_amp = get_tx_amp(Po_PUCCH, tx_amp = get_tx_amp(Po_PUCCH,
phy_vars_ue->tx_power_max_dBm, phy_vars_ue->tx_power_max_dBm,
phy_vars_ue->lte_frame_parms.N_RB_UL, phy_vars_ue->lte_frame_parms.N_RB_UL,
...@@ -1128,7 +1128,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra ...@@ -1128,7 +1128,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
#endif #endif
phy_vars_ue->tx_total_RE = 12; phy_vars_ue->tx_total_RE = 12;
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
tx_amp = get_tx_amp(Po_PUCCH, tx_amp = get_tx_amp(Po_PUCCH,
phy_vars_ue->tx_power_max_dBm, phy_vars_ue->tx_power_max_dBm,
phy_vars_ue->lte_frame_parms.N_RB_UL, phy_vars_ue->lte_frame_parms.N_RB_UL,
...@@ -1230,7 +1230,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra ...@@ -1230,7 +1230,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
if (abstraction_flag == 0) { if (abstraction_flag == 0) {
nsymb = (frame_parms->Ncp == 0) ? 14 : 12; nsymb = (frame_parms->Ncp == 0) ? 14 : 12;
#if defined(EXMIMO) || defined(OAI_USRP) //this is the EXPRESS MIMO case #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)//this is the EXPRESS MIMO case
ulsch_start = (phy_vars_ue->rx_offset+subframe_tx*frame_parms->samples_per_tti- ulsch_start = (phy_vars_ue->rx_offset+subframe_tx*frame_parms->samples_per_tti-
openair_daq_vars.timing_advance- openair_daq_vars.timing_advance-
phy_vars_ue->timing_advance- phy_vars_ue->timing_advance-
...@@ -1257,7 +1257,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra ...@@ -1257,7 +1257,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) { for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
if (frame_parms->Ncp == 1) if (frame_parms->Ncp == 1)
PHY_ofdm_mod(&phy_vars_ue->lte_ue_common_vars.txdataF[aa][subframe_tx*nsymb*frame_parms->ofdm_symbol_size], PHY_ofdm_mod(&phy_vars_ue->lte_ue_common_vars.txdataF[aa][subframe_tx*nsymb*frame_parms->ofdm_symbol_size],
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
dummy_tx_buffer, dummy_tx_buffer,
#else #else
&phy_vars_ue->lte_ue_common_vars.txdata[aa][ulsch_start], &phy_vars_ue->lte_ue_common_vars.txdata[aa][ulsch_start],
...@@ -1268,7 +1268,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra ...@@ -1268,7 +1268,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
CYCLIC_PREFIX); CYCLIC_PREFIX);
else else
normal_prefix_mod(&phy_vars_ue->lte_ue_common_vars.txdataF[aa][subframe_tx*nsymb*frame_parms->ofdm_symbol_size], normal_prefix_mod(&phy_vars_ue->lte_ue_common_vars.txdataF[aa][subframe_tx*nsymb*frame_parms->ofdm_symbol_size],
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
dummy_tx_buffer, dummy_tx_buffer,
#else #else
&phy_vars_ue->lte_ue_common_vars.txdata[aa][ulsch_start], &phy_vars_ue->lte_ue_common_vars.txdata[aa][ulsch_start],
...@@ -1289,7 +1289,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra ...@@ -1289,7 +1289,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
} }
*/ */
#ifndef OFDMA_ULSCH #ifndef OFDMA_ULSCH
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
apply_7_5_kHz(phy_vars_ue,dummy_tx_buffer,0); apply_7_5_kHz(phy_vars_ue,dummy_tx_buffer,0);
apply_7_5_kHz(phy_vars_ue,dummy_tx_buffer,1); apply_7_5_kHz(phy_vars_ue,dummy_tx_buffer,1);
#else #else
...@@ -1304,7 +1304,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra ...@@ -1304,7 +1304,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
*/ */
#endif #endif
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
overflow = ulsch_start - 9*frame_parms->samples_per_tti; overflow = ulsch_start - 9*frame_parms->samples_per_tti;
//if ((slot_tx==4) && (aa==0)) printf("ulsch_start %d, overflow %d\n",ulsch_start,overflow); //if ((slot_tx==4) && (aa==0)) printf("ulsch_start %d, overflow %d\n",ulsch_start,overflow);
...@@ -1404,7 +1404,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra ...@@ -1404,7 +1404,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
phy_vars_ue->tx_total_RE = 96; phy_vars_ue->tx_total_RE = 96;
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
phy_vars_ue->lte_ue_prach_vars[eNB_id]->amp = get_tx_amp(phy_vars_ue->tx_power_dBm, phy_vars_ue->lte_ue_prach_vars[eNB_id]->amp = get_tx_amp(phy_vars_ue->tx_power_dBm,
phy_vars_ue->tx_power_max_dBm, phy_vars_ue->tx_power_max_dBm,
phy_vars_ue->lte_frame_parms.N_RB_UL, phy_vars_ue->lte_frame_parms.N_RB_UL,
...@@ -1553,9 +1553,11 @@ void lte_ue_measurement_procedures(uint16_t l, PHY_VARS_UE *phy_vars_ue,uint8_t ...@@ -1553,9 +1553,11 @@ void lte_ue_measurement_procedures(uint16_t l, PHY_VARS_UE *phy_vars_ue,uint8_t
#else #else
#ifndef OAI_USRP #ifndef OAI_USRP
#ifndef OAI_BLADERF #ifndef OAI_BLADERF
#ifndef OAI_LMSSDR
phy_adjust_gain (phy_vars_ue,0); phy_adjust_gain (phy_vars_ue,0);
#endif #endif
#endif
#endif #endif
#endif #endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_OUT);
......
...@@ -656,7 +656,17 @@ int main(int argc, char **argv) ...@@ -656,7 +656,17 @@ int main(int argc, char **argv)
printf("dual_stream_UE=%d\n", dual_stream_UE); printf("dual_stream_UE=%d\n", dual_stream_UE);
} }
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,tdd_config,N_RB_DL,threequarter_fs,osf,perfect_ce); lte_param_init(n_tx,
n_rx,
transmission_mode,
extended_prefix_flag,
frame_type,
Nid_cell,
tdd_config,
N_RB_DL,
threequarter_fs,
osf,
perfect_ce);
......
...@@ -194,6 +194,7 @@ int main(int argc, char **argv) ...@@ -194,6 +194,7 @@ int main(int argc, char **argv)
int nb_rb_set = 0; int nb_rb_set = 0;
int sf; int sf;
int threequarter_fs=0;
opp_enabled=1; // to enable the time meas opp_enabled=1; // to enable the time meas
cpu_freq_GHz = (double)get_cpu_freq_GHz(); cpu_freq_GHz = (double)get_cpu_freq_GHz();
...@@ -203,7 +204,7 @@ int main(int argc, char **argv) ...@@ -203,7 +204,7 @@ int main(int argc, char **argv)
logInit(); logInit();
while ((c = getopt (argc, argv, "hapZbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:L")) != -1) { while ((c = getopt (argc, argv, "hapZEbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:L")) != -1) {
switch (c) { switch (c) {
case 'a': case 'a':
channel_model = AWGN; channel_model = AWGN;
...@@ -373,6 +374,10 @@ int main(int argc, char **argv) ...@@ -373,6 +374,10 @@ int main(int argc, char **argv)
cyclic_shift = atoi(optarg); cyclic_shift = atoi(optarg);
break; break;
case 'E':
threequarter_fs=1;
break;
case 'N': case 'N':
N0 = atoi(optarg); N0 = atoi(optarg);
break; break;
...@@ -470,6 +475,7 @@ int main(int argc, char **argv) ...@@ -470,6 +475,7 @@ int main(int argc, char **argv)
0, 0,
tdd_config, tdd_config,
N_RB_DL, N_RB_DL,
threequarter_fs,
osf, osf,
0); 0);
......
This diff is collapsed.
...@@ -78,6 +78,24 @@ typedef struct mme_ip_address_s { ...@@ -78,6 +78,24 @@ typedef struct mme_ip_address_s {
char *ipv6_address; char *ipv6_address;
} mme_ip_address_t; } mme_ip_address_t;
typedef struct rrh_gw_config_s {
unsigned udp:1;
unsigned raw:1;
unsigned active:1;
char *local_address;
char *remote_address;
uint16_t local_port;
uint16_t remote_port;
int tx_scheduling_advance;
int tx_sample_advance;
int iq_txshift;
unsigned exmimo:1;
unsigned usrp_b200:1;
unsigned usrp_x300:1;
unsigned bladerf:1;
unsigned lmssdr:1;
} rrh_gw_config_t;
typedef struct Enb_properties_s { typedef struct Enb_properties_s {
/* Unique eNB_id to identify the eNB within EPC. /* Unique eNB_id to identify the eNB within EPC.
* For macro eNB ids this field should be 20 bits long. * For macro eNB ids this field should be 20 bits long.
...@@ -203,6 +221,13 @@ typedef struct Enb_properties_s { ...@@ -203,6 +221,13 @@ typedef struct Enb_properties_s {
char *enb_interface_name_for_S1_MME; char *enb_interface_name_for_S1_MME;
in_addr_t enb_ipv4_address_for_S1_MME; in_addr_t enb_ipv4_address_for_S1_MME;
/* Nb of RRH to connect to */
uint8_t nb_rrh_gw;
char *rrh_gw_if_name;
/* List of MME to connect to */
rrh_gw_config_t rrh_gw_config[4];
// otg config // otg config
/* Nb of OTG elements */ /* Nb of OTG elements */
uint8_t num_otg_elements; uint8_t num_otg_elements;
......
...@@ -106,6 +106,9 @@ const char* eurecomVariablesNames[] = { ...@@ -106,6 +106,9 @@ const char* eurecomVariablesNames[] = {
"lhw_cnt_tx", "lhw_cnt_tx",
"pck_rx", "pck_rx",
"pck_tx", "pck_tx",
"rx_seq_num",
"rx_seq_num_prv",
"tx_seq_num",
"cnt", "cnt",
"dummy_dump", "dummy_dump",
"itti_send_msg", "itti_send_msg",
......
...@@ -78,6 +78,9 @@ typedef enum { ...@@ -78,6 +78,9 @@ typedef enum {
VCD_SIGNAL_DUMPER_VARIABLES_TX_LHWCNT, VCD_SIGNAL_DUMPER_VARIABLES_TX_LHWCNT,
VCD_SIGNAL_DUMPER_VARIABLES_RX_PCK, VCD_SIGNAL_DUMPER_VARIABLES_RX_PCK,
VCD_SIGNAL_DUMPER_VARIABLES_TX_PCK, VCD_SIGNAL_DUMPER_VARIABLES_TX_PCK,
VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM,
VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM_PRV,
VCD_SIGNAL_DUMPER_VARIABLES_TX_SEQ_NUM,
VCD_SIGNAL_DUMPER_VARIABLES_CNT, VCD_SIGNAL_DUMPER_VARIABLES_CNT,
VCD_SIGNAL_DUMPER_VARIABLES_DUMMY_DUMP, VCD_SIGNAL_DUMPER_VARIABLES_DUMMY_DUMP,
VCD_SIGNAL_DUMPER_VARIABLE_ITTI_SEND_MSG, VCD_SIGNAL_DUMPER_VARIABLE_ITTI_SEND_MSG,
......
...@@ -38,6 +38,11 @@ ...@@ -38,6 +38,11 @@
#include <inttypes.h> #include <inttypes.h>
#include "bladerf_lib.h" #include "bladerf_lib.h"
/** @addtogroup _BLADERF_PHY_RF_INTERFACE_
* @{
*/
//! Number of BladeRF devices
#ifdef __SSE4_1__ #ifdef __SSE4_1__
# include <smmintrin.h> # include <smmintrin.h>
#endif #endif
...@@ -47,13 +52,21 @@ ...@@ -47,13 +52,21 @@
#endif #endif
int num_devices=0; int num_devices=0;
/*These items configure the underlying asynch stream used by the the sync interface. /*These items configure the underlying asynch stream used by the the sync interface.
*/ */
int trx_brf_init(openair0_device *openair0) { /*! \brief BladeRF Init function (not used at the moment)
* \param device RF frontend parameters set by application
*/
int trx_brf_init(openair0_device *device) {
} }
/*! \brief get current timestamp
*\param device the hardware to use
*\param module the bladeRf module
*/
openair0_timestamp trx_get_timestamp(openair0_device *device, bladerf_module module) { openair0_timestamp trx_get_timestamp(openair0_device *device, bladerf_module module) {
int status; int status;
...@@ -69,18 +82,31 @@ openair0_timestamp trx_get_timestamp(openair0_device *device, bladerf_module mod ...@@ -69,18 +82,31 @@ openair0_timestamp trx_get_timestamp(openair0_device *device, bladerf_module mod
return meta.timestamp; return meta.timestamp;
} }
/*! \brief Start BladeRF
int trx_brf_start(openair0_device *openair0) { *\param device the hardware to use
*/
int trx_brf_start(openair0_device *device) {
return 0; return 0;
} }
/*! \brief Get BladeRF stats
*\param device the hardware to use
*/
static void trx_brf_stats(openair0_device *device){ static void trx_brf_stats(openair0_device *device){
} }
static int trx_brf_write(openair0_device *device,openair0_timestamp ptimestamp, void **buff, int nsamps, int cc) { /*! \brief Called to send samples to the BladeRF RF target
@param device pointer to the device structure specific to the RF hardware target
@param timestamp The timestamp at whicch the first sample MUST be sent
@param buff Buffer which holds the samples
@param nsamps number of samples to be sent
@param cc index of the component carrier
@param flags Ignored for the moment
*/
static int trx_brf_write(openair0_device *device,openair0_timestamp ptimestamp, void **buff, int nsamps, int cc, int flags) {
int status; int status;
brf_state_t *brf = (brf_state_t*)device->priv; brf_state_t *brf = (brf_state_t*)device->priv;
...@@ -121,6 +147,16 @@ static int trx_brf_write(openair0_device *device,openair0_timestamp ptimestamp, ...@@ -121,6 +147,16 @@ static int trx_brf_write(openair0_device *device,openair0_timestamp ptimestamp,
return(0); return(0);
} }
/*! \brief Receive samples from hardware.
* Read \ref nsamps samples from each channel to buffers. buff[0] is the array for
* the first channel. *ptimestamp is the time at which the first sample
* was received.
* \param device the hardware to use
* \param[out] ptimestamp the time at which the first sample was received.
* \param[out] buff An array of pointers to buffers for received samples. The buffers must be large enough to hold the number of samples \ref nsamps.
* \param nsamps Number of samples. One sample is 2 byte I + 2 byte Q => 4 byte.
* \param cc Index of component carrier
*/
static int trx_brf_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc) { static int trx_brf_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc) {
int status=0; int status=0;
...@@ -157,6 +193,9 @@ static int trx_brf_read(openair0_device *device, openair0_timestamp *ptimestamp, ...@@ -157,6 +193,9 @@ static int trx_brf_read(openair0_device *device, openair0_timestamp *ptimestamp,
} }
/*! \brief Terminate operation of the BladeRF transceiver -- free all associated resources
* \param device the hardware to use
*/
int trx_brf_end(openair0_device *device) { int trx_brf_end(openair0_device *device) {
int status; int status;
...@@ -172,25 +211,39 @@ int trx_brf_end(openair0_device *device) { ...@@ -172,25 +211,39 @@ int trx_brf_end(openair0_device *device) {
return 0; return 0;
} }
/*! \brief print the BladeRF statistics
* \param device the hardware to use
* \returns 0 on success
*/
int trx_brf_get_stats(openair0_device* device) { int trx_brf_get_stats(openair0_device* device) {
return(0); return(0);
} }
/*! \brief Reset the BladeRF statistics
* \param device the hardware to use
* \returns 0 on success
*/
int trx_brf_reset_stats(openair0_device* device) { int trx_brf_reset_stats(openair0_device* device) {
return(0); return(0);
} }
/*! \brief Stop USRP
* \param device the hardware to use
*/
int trx_brf_stop(openair0_device* device) { int trx_brf_stop(openair0_device* device) {
return(0); return(0);
} }
/*! \brief Set frequencies (TX/RX)
* \param device the hardware to use
* \returns 0 in success
*/
int trx_brf_set_freq(openair0_device* device) { int trx_brf_set_freq(openair0_device* device) {
int status; int status;
...@@ -213,12 +266,19 @@ int trx_brf_set_freq(openair0_device* device) { ...@@ -213,12 +266,19 @@ int trx_brf_set_freq(openair0_device* device) {
return(0); return(0);
} }
/*! \brief Set Gains (TX/RX)
* \param device the hardware to use
* \returns 0 in success
*/
int trx_brf_set_gains(openair0_device* device) { int trx_brf_set_gains(openair0_device* device) {
return(0); return(0);
} }
#define RXDCLENGTH 16384 #define RXDCLENGTH 16384
int16_t cos_fsover8[8] = {2047, 1447, 0, -1448, -2047, -1448, 0, 1447}; int16_t cos_fsover8[8] = {2047, 1447, 0, -1448, -2047, -1448, 0, 1447};
int16_t cos_3fsover8[8] = {2047, -1448, 0, 1447, -2047, 1447, 0, -1448}; int16_t cos_3fsover8[8] = {2047, -1448, 0, 1447, -2047, 1447, 0, -1448};
...@@ -822,15 +882,23 @@ void calibrate_rf(openair0_device *device) { ...@@ -822,15 +882,23 @@ void calibrate_rf(openair0_device *device) {
// write_output("blade_rf_test.m","rxs",calib_buff,RXDCLENGTH,1,1); // write_output("blade_rf_test.m","rxs",calib_buff,RXDCLENGTH,1,1);
} }
int openair0_dev_init_bladerf(openair0_device *device, openair0_config_t *openair0_cfg) { /*! \brief Initialize Openair BLADERF target. It returns 0 if OK
* \param device the hardware to use
* \param openair0_cfg RF frontend parameters set by application
*/
int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
int status; int status;
int card=0; int card=0;
brf_state_t *brf = (brf_state_t*)malloc(sizeof(brf_state_t)); brf_state_t *brf = (brf_state_t*)malloc(sizeof(brf_state_t));
memset(brf, 0, sizeof(brf_state_t)); memset(brf, 0, sizeof(brf_state_t));
// init required params /* 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->iq_txshift = 0;// shift
openair0_cfg->iq_rxrescale = 15;//rescale iqs
// init required params
switch ((int)openair0_cfg->sample_rate) { switch ((int)openair0_cfg->sample_rate) {
case 30720000: case 30720000:
openair0_cfg->samples_per_packet = 2048; openair0_cfg->samples_per_packet = 2048;
...@@ -857,7 +925,8 @@ int openair0_dev_init_bladerf(openair0_device *device, openair0_config_t *openai ...@@ -857,7 +925,8 @@ int openair0_dev_init_bladerf(openair0_device *device, openair0_config_t *openai
exit(-1); exit(-1);
break; break;
} }
openair0_cfg->iq_txshift= 0;
openair0_cfg->iq_rxrescale = 15; /*not sure*/
openair0_cfg->rx_gain_calib_table = calib_table_fx4; openair0_cfg->rx_gain_calib_table = calib_table_fx4;
// The number of buffers to use in the underlying data stream // The number of buffers to use in the underlying data stream
...@@ -1001,6 +1070,7 @@ int openair0_dev_init_bladerf(openair0_device *device, openair0_config_t *openai ...@@ -1001,6 +1070,7 @@ int openair0_dev_init_bladerf(openair0_device *device, openair0_config_t *openai
printf("BLADERF: Initializing openair0_device\n"); printf("BLADERF: Initializing openair0_device\n");
device->priv = brf; device->priv = brf;
device->Mod_id = num_devices++; device->Mod_id = num_devices++;
device->type = BLADERF_DEV;
device->trx_start_func = trx_brf_start; device->trx_start_func = trx_brf_start;
device->trx_end_func = trx_brf_end; device->trx_end_func = trx_brf_end;
device->trx_read_func = trx_brf_read; device->trx_read_func = trx_brf_read;
...@@ -1019,6 +1089,9 @@ int openair0_dev_init_bladerf(openair0_device *device, openair0_config_t *openai ...@@ -1019,6 +1089,9 @@ int openair0_dev_init_bladerf(openair0_device *device, openair0_config_t *openai
return 0; return 0;
} }
/*! \brief bladeRF error report
* \param status
*/
int brf_error(int status) { int brf_error(int status) {
//exit(-1); //exit(-1);
...@@ -1026,7 +1099,9 @@ int brf_error(int status) { ...@@ -1026,7 +1099,9 @@ int brf_error(int status) {
} }
/*! \brief Open BladeRF from serial port
* \param serial name of serial port on which to open BladeRF device
*/
struct bladerf * open_bladerf_from_serial(const char *serial) { struct bladerf * open_bladerf_from_serial(const char *serial) {
int status; int status;
...@@ -1053,6 +1128,10 @@ struct bladerf * open_bladerf_from_serial(const char *serial) { ...@@ -1053,6 +1128,10 @@ struct bladerf * open_bladerf_from_serial(const char *serial) {
return dev; return dev;
} }
} }
/*! \brief Get BladeRF log level
* \param log_level log level
*/
int get_brf_log_level(int log_level){ int get_brf_log_level(int log_level){
int level=BLADERF_LOG_LEVEL_INFO; int level=BLADERF_LOG_LEVEL_INFO;
...@@ -1081,3 +1160,4 @@ int get_brf_log_level(int log_level){ ...@@ -1081,3 +1160,4 @@ int get_brf_log_level(int log_level){
} }
return level; return level;
} }
/*@}*/
...@@ -37,45 +37,69 @@ ...@@ -37,45 +37,69 @@
#include "common_lib.h" #include "common_lib.h"
#include "log.h" #include "log.h"
/** @addtogroup _BLADERF_PHY_RF_INTERFACE_
* @{
*/
/*! \brief BladeRF specific data structure */
typedef struct { typedef struct {
// opaque BRF data struct //! opaque BladeRF device struct. An empty ("") or NULL device identifier will result in the first encountered device being opened (using the first discovered backend)
struct bladerf *dev; struct bladerf *dev;
// An empty ("") or NULL device identifier will result in the first encountered device being opened (using the first discovered backend)
//! Number of buffers
unsigned int num_buffers; unsigned int num_buffers;
//! Buffer size
unsigned int buffer_size; unsigned int buffer_size;
//! Number of transfers
unsigned int num_transfers; unsigned int num_transfers;
//! RX timeout
unsigned int rx_timeout_ms; unsigned int rx_timeout_ms;
//! TX timeout
unsigned int tx_timeout_ms; unsigned int tx_timeout_ms;
//! Metadata for RX
struct bladerf_metadata meta_rx; struct bladerf_metadata meta_rx;
//!Metadata for TX
struct bladerf_metadata meta_tx; struct bladerf_metadata meta_tx;
//! Sample rate
unsigned int sample_rate; unsigned int sample_rate;
// time offset between transmiter timestamp and receiver timestamp; //! time offset between transmiter timestamp and receiver timestamp;
double tdiff; double tdiff;
// use brf_time_offset to get this value //! TX number of forward samples use brf_time_offset to get this value
int tx_forward_nsamps; //166 for 20Mhz int tx_forward_nsamps; //166 for 20Mhz
// -------------------------------- // --------------------------------
// Debug and output control // Debug and output control
// -------------------------------- // --------------------------------
//! Number of underflows
int num_underflows; int num_underflows;
//! Number of overflows
int num_overflows; int num_overflows;
//! number of sequential errors
int num_seq_errors; int num_seq_errors;
//! number of RX errors
int num_rx_errors; int num_rx_errors;
//! Number of TX errors
int num_tx_errors; int num_tx_errors;
//! timestamp of current TX
uint64_t tx_current_ts; uint64_t tx_current_ts;
//! timestamp of current RX
uint64_t rx_current_ts; uint64_t rx_current_ts;
//! number of actual samples transmitted
uint64_t tx_actual_nsamps; uint64_t tx_actual_nsamps;
//! number of actual samples received
uint64_t rx_actual_nsamps; uint64_t rx_actual_nsamps;
//! number of TX samples
uint64_t tx_nsamps; uint64_t tx_nsamps;
//! number of RX samples
uint64_t rx_nsamps; uint64_t rx_nsamps;
//! number of TX count
uint64_t tx_count; uint64_t tx_count;
//! number of RX count
uint64_t rx_count; uint64_t rx_count;
//! timestamp of RX packet
openair0_timestamp rx_timestamp; openair0_timestamp rx_timestamp;
} brf_state_t; } brf_state_t;
...@@ -84,3 +108,4 @@ typedef struct { ...@@ -84,3 +108,4 @@ typedef struct {
*/ */
int brf_error(int status); int brf_error(int status);
/*@}*/
...@@ -37,31 +37,140 @@ ...@@ -37,31 +37,140 @@
* \warning * \warning
*/ */
#include <stdio.h> #include <stdio.h>
#include <strings.h>
#include <dlfcn.h>
#include <errno.h>
#include <string.h>
#include "common_lib.h" #include "common_lib.h"
int set_device(openair0_device *device) {
switch (device->type) {
case EXMIMO_DEV:
printf("[%s] has loaded EXPRESS MIMO device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
break;
case USRP_B200_DEV:
printf("[%s] has loaded USRP B200 device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
break;
case USRP_X300_DEV:
printf("[%s] has loaded USRP X300 device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
break;
case BLADERF_DEV:
printf("[%s] has loaded BLADERF device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
break;
case LMSSDR_DEV:
printf("[%s] has loaded LMSSDR device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
break;
case NONE_DEV:
printf("[%s] has not loaded a HW device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
break;
default:
printf("[%s] invalid HW device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
return -1;
}
return 0;
}
int set_transport(openair0_device *device) {
switch (device->transp_type) {
case ETHERNET_TP:
printf("[%s] has loaded ETHERNET trasport protocol.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
return 0;
break;
case NONE_TP:
printf("[%s] has not loaded a transport protocol.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
return 0;
break;
default:
printf("[%s] invalid transport protocol.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
return -1;
break;
}
}
/* look for the interface library and load it */
int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_params_t * cfg, uint8_t flag) {
void *lib_handle;
oai_device_initfunc_t dp ;
oai_transport_initfunc_t tp ;
if (flag == BBU_LOCAL_RADIO_HEAD) {
lib_handle = dlopen(OAI_RF_LIBNAME, RTLD_LAZY);
if (!lib_handle) {
printf( "Unable to locate %s: HW device set to NONE_DEV.\n", OAI_RF_LIBNAME);
return 0;
}
dp = dlsym(lib_handle,"device_init");
int openair0_device_init(openair0_device *device, openair0_config_t *openair0_cfg) { if (dp != NULL ) {
dp(device,openair0_cfg);
} else {
fprintf(stderr, "%s %d:oai device intializing function not found %s\n", __FILE__, __LINE__, dlerror());
return -1;
}
} else {
lib_handle = dlopen(OAI_TP_LIBNAME, RTLD_LAZY);
if (!lib_handle) {
printf( "Unable to locate %s: transport protocol set to NONE_TP.\n", OAI_TP_LIBNAME);
return 0;
}
#ifdef ETHERNET tp = dlsym(lib_handle,"transport_init");
device->type=ETH_IF;
device->func_type = BBU_FUNC;
printf(" openair0_dev_init_eth ...\n");
return(openair0_dev_init_eth(device, openair0_cfg));
#elif EXMIMO if (tp != NULL ) {
device->type=EXMIMO_IF; tp(device,openair0_cfg,cfg);
printf("openair0_dev_init_exmimo...\n"); } else {
return(openair0_dev_init_exmimo(device, openair0_cfg)); fprintf(stderr, "%s %d:oai device intializing function not found %s\n", __FILE__, __LINE__, dlerror());
#elif OAI_USRP return -1;
device->type=USRP_B200_IF; }
printf("openair0_dev_init_usrp ...\n"); }
return(openair0_dev_init_usrp(device, openair0_cfg));
return 0;
}
#elif OAI_BLADERF
device->type=BLADERF_IF;
printf(" openair0_dev_init_bladerf ...\n");
return(openair0_dev_init_bladerf(device, openair0_cfg));
#endif
int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cfg) {
int rc;
//ToDo: EXMIMO harmonization is not complete. That is the reason for this ifdef
#ifdef EXMIMO
device_init(device, openair0_cfg);
#else
rc=load_lib(device, openair0_cfg, NULL,BBU_LOCAL_RADIO_HEAD );
if ( rc >= 0) {
if ( set_device(device) < 0) {
fprintf(stderr, "%s %d:Unsupported radio head\n",__FILE__, __LINE__);
return -1;
}
}
#endif
return 0;
} }
int openair0_transport_load(openair0_device *device, openair0_config_t *openair0_cfg, eth_params_t * eth_params) {
int rc;
rc=load_lib(device, openair0_cfg, eth_params, BBU_REMOTE_RADIO_HEAD);
if ( rc >= 0) {
if ( set_transport(device) < 0) {
fprintf(stderr, "%s %d:Unsupported transport protocol\n",__FILE__, __LINE__);
return -1;
}
}
return 0;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
* \note * \note
* \warning * \warning
*/ */
#ifndef ETHERNET_LIB_H
#define ETHERNET_LIB_H
#include <arpa/inet.h> #include <arpa/inet.h>
#include <linux/if_packet.h> #include <linux/if_packet.h>
...@@ -49,69 +51,88 @@ ...@@ -49,69 +51,88 @@
#define MAX_INST 4 #define MAX_INST 4
#define DEFAULT_IF "lo" #define DEFAULT_IF "lo"
#define BUF_SIZ 8960 /*Jumbo frame size*/
typedef struct { #define ETH_RAW_MODE 1
#define ETH_UDP_MODE 0
// opaque eth data struct #define TX_FLAG 1
//struct eth_if *dev; #define RX_FLAG 0
// An empty ("") or NULL device identifier will result in the first encountered device being opened (using the first discovered backend)
int sockfd[MAX_INST]; #define MAX_PACKET_SEQ_NUM(spp,spf) (spf/spp)
struct sockaddr_in dest_addr[MAX_INST]; #define MAC_HEADER_SIZE_BYTES (sizeof(struct ether_header))
#define APP_HEADER_SIZE_BYTES (sizeof(int32_t) + sizeof(openair0_timestamp))
#define PAYLOAD_SIZE_BYTES(nsamps) (nsamps<<2)
#define UDP_PACKET_SIZE_BYTES(nsamps) (APP_HEADER_SIZE_BYTES + PAYLOAD_SIZE_BYTES(nsamps))
#define RAW_PACKET_SIZE_BYTES(nsamps) (APP_HEADER_SIZE_BYTES + MAC_HEADER_SIZE_BYTES + PAYLOAD_SIZE_BYTES(nsamps))
unsigned int buffer_size;
unsigned int timeout_ns;
//struct eth_metadata meta_rx; /*!\brief opaque ethernet data structure */
//struct eth_metadata meta_tx; typedef struct {
unsigned int sample_rate; /*!\brief socket file desc */
// time offset between transmiter timestamp and receiver timestamp; int sockfd[MAX_INST];
/*!\brief interface name */
char *if_name[MAX_INST];
/*!\brief buffer size */
unsigned int buffer_size;
/*!\brief timeout ms */
unsigned int rx_timeout_ms;
/*!\brief timeout ms */
unsigned int tx_timeout_ms;
/*!\brief runtime flags */
uint32_t flags;
/*!\ time offset between transmiter timestamp and receiver timestamp */
double tdiff; double tdiff;
// use brf_time_offset to get this value /*!\ calibration */
int tx_forward_nsamps; //166 for 20Mhz int tx_forward_nsamps;
// -------------------------------- // --------------------------------
// Debug and output control // Debug and output control
// -------------------------------- // --------------------------------
/*!\brief number of I/Q samples to be printed */
int iqdumpcnt;
/*!\brief number of underflows in interface */
int num_underflows; int num_underflows;
/*!\brief number of overflows in interface */
int num_overflows; int num_overflows;
/*!\brief number of concesutive errors in interface */
int num_seq_errors; int num_seq_errors;
/*!\brief number of errors in interface's receiver */
int num_rx_errors; int num_rx_errors;
/*!\brief umber of errors in interface's transmitter */
int num_tx_errors; int num_tx_errors;
uint64_t tx_actual_nsamps; // actual number of samples transmitted /*!\brief current TX timestamp */
openair0_timestamp tx_current_ts;
/*!\brief socket file desc */
openair0_timestamp rx_current_ts;
/*!\brief actual number of samples transmitted */
uint64_t tx_actual_nsamps;
/*!\brief actual number of samples received */
uint64_t rx_actual_nsamps; uint64_t rx_actual_nsamps;
uint64_t tx_nsamps; // number of planned samples /*!\brief number of samples to be transmitted */
uint64_t tx_nsamps;
/*!\brief number of samples to be received */
uint64_t rx_nsamps; uint64_t rx_nsamps;
uint64_t tx_count; // number pf packets /*!\brief number of packets transmitted */
uint64_t tx_count;
/*!\brief number of packets received */
uint64_t rx_count; uint64_t rx_count;
//openair0_timestamp rx_timestamp;
} eth_state_t; } eth_state_t;
#define ETH_META_STATUS_OVERRUN (1 << 0)
#define ETH_META_STATUS_UNDERRUN (1 << 1)
struct eth_meta_data{
uint64_t timestamp;
uint32_t flags;
uint32_t status;
unsigned int actual_count;
};
/*!\brief packet header */ /*!\brief packet header */
typedef struct { typedef struct {
/*!\brief packet sequence number max value=packets per frame*/
uint16_t seq_num ;
/*!\brief antenna port used to resynchronize */
uint16_t antenna_id;
/*!\brief packet's timestamp */ /*!\brief packet's timestamp */
openair0_timestamp timestamp; openair0_timestamp timestamp;
/*!\brief variable declared for alignment purposes (sample size=32 bit) */
int16_t not_used;
/*!\brief antenna port used to resynchronize */
int16_t antenna_id;
} header_t; } header_t;
/*!\brief different options for ethernet tuning in socket and driver level */ /*!\brief different options for ethernet tuning in socket and driver level */
...@@ -138,9 +159,37 @@ typedef enum { ...@@ -138,9 +159,37 @@ typedef enum {
MAX_OPT MAX_OPT
} eth_opt_t; } eth_opt_t;
/*
#define SND_BUF_SIZE 1
#define RCV_BUF_SIZE 1<<1
#define SND_TIMEOUT 1<<2
#define RCV_TIMEOUT 1<<3
#define MTU_SIZE 1<<4
#define TX_Q_LEN 1<<5
#define RING_PAR 1<<5
#define COALESCE_PAR 1<<6
#define PAUSE_PAR 1<<7
*/
/*!\brief I/Q samples */
typedef struct {
/*!\brief phase */
short i;
/*!\brief quadrature */
short q;
} iqoai_t ;
/*! \fn int ethernet_tune (openair0_device *device, eth_opt_t option) void dump_packet(char *title, unsigned char* pkt, int bytes, unsigned int tx_rx_flag);
unsigned short calc_csum (unsigned short *buf, int nwords);
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_rxcounters(openair0_device *device);
void inline dump_txcounters(openair0_device *device);
void dump_iqs(char * buff, int iq_cnt);
/*! \fn int ethernet_tune (openair0_device *device, unsigned int option, int value);
* \brief this function allows you to configure certain ethernet parameters in socket or device level * \brief this function allows you to configure certain ethernet parameters in socket or device level
* \param[in] openair0 device which bears the socket * \param[in] openair0 device which bears the socket
* \param[in] name of parameter to configure * \param[in] name of parameter to configure
...@@ -148,6 +197,37 @@ typedef enum { ...@@ -148,6 +197,37 @@ typedef enum {
* \note * \note
* @ingroup _oai * @ingroup _oai
*/ */
int ethernet_tune (openair0_device *device, eth_opt_t option); int ethernet_tune(openair0_device *device, unsigned int option, int value);
int ethernet_write_data(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int cc) ;
int ethernet_read_data(openair0_device *device,openair0_timestamp *timestamp,void **buff, int nsamps,int cc);
/*! \fn int eth_socket_init_udp(openair0_device *device)
* \brief initialization of UDP Socket to communicate with one destination
* \param[in] *device openair device for which the socket will be created
* \param[out]
* \return 0 on success, otherwise -1
* \note
* @ingroup _oai
*/
int eth_socket_init_udp(openair0_device *device);
int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int cc, int flags);
int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc);
int eth_get_dev_conf_udp(openair0_device *device);
/*! \fn static int eth_set_dev_conf_udp(openair0_device *device)
* \brief
* \param[in] *device openair device
* \param[out]
* \return 0 on success, otherwise -1
* \note
* @ingroup _oai
*/
int eth_set_dev_conf_udp(openair0_device *device);
int eth_socket_init_raw(openair0_device *device);
int trx_eth_write_raw(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int cc, int flags);
int trx_eth_read_raw(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc);
int eth_get_dev_conf_raw(openair0_device *device);
int eth_set_dev_conf_raw(openair0_device *device);
#endif
...@@ -247,7 +247,7 @@ int openair0_stop_without_reset(int card) ...@@ -247,7 +247,7 @@ int openair0_stop_without_reset(int card)
#define MY_RF_MODE (RXEN + TXEN + TXLPFNORM + TXLPFEN + TXLPF25 + RXLPFNORM + RXLPFEN + RXLPF25 + LNA1ON +LNAMax + RFBBNORM + DMAMODE_RX + DMAMODE_TX) #define MY_RF_MODE (RXEN + TXEN + TXLPFNORM + TXLPFEN + TXLPF25 + RXLPFNORM + RXLPFEN + RXLPF25 + LNA1ON +LNAMax + RFBBNORM + DMAMODE_RX + DMAMODE_TX)
#define RF_MODE_BASE (LNA1ON + RFBBNORM) #define RF_MODE_BASE (LNA1ON + RFBBNORM)
int openair0_dev_init_exmimo(openair0_device *device, openair0_config_t *openair0_cfg) { int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
// Initialize card // Initialize card
// exmimo_config_t *p_exmimo_config; // exmimo_config_t *p_exmimo_config;
...@@ -287,6 +287,8 @@ int openair0_dev_init_exmimo(openair0_device *device, openair0_config_t *openair ...@@ -287,6 +287,8 @@ int openair0_dev_init_exmimo(openair0_device *device, openair0_config_t *openair
return(-1); return(-1);
} }
device->type = EXMIMO_DEV;
return(0); return(0);
} }
...@@ -323,6 +325,12 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag) ...@@ -323,6 +325,12 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
else else
p_exmimo_config->framing.multicard_syncmode=SYNCMODE_SLAVE; p_exmimo_config->framing.multicard_syncmode=SYNCMODE_SLAVE;
/* device specific */
openair0_cfg[card].txlaunch_wait = 1;//manage when TX processing is triggered
openair0_cfg[card].txlaunch_wait_slotcount = 1; //manage when TX processing is triggered
openair0_cfg[card].iq_txshift = 4;//shift
openair0_cfg[card].iq_rxrescale = 15;//rescale iqs
if (openair0_cfg[card].sample_rate==30.72e6) { if (openair0_cfg[card].sample_rate==30.72e6) {
resampling_factor = 0; resampling_factor = 0;
rx_filter = RXLPF10; rx_filter = RXLPF10;
......
set(si5351_src_files
Si5351C.cpp
)
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -std=c++11 "
)
add_library(Si5351C STATIC ${si5351_src_files})
target_include_directories(Si5351C PUBLIC ../lms7002m ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(Si5351C LMS7002M)
This diff is collapsed.
/**
@file Si5351C.h
@brief Header for Si5351C.cpp
@author Lime Microsystems
*/
#ifndef SI5351C_MODULE
#define SI5351C_MODULE
#include <stdio.h>
#include <string>
using namespace std;
//---------------------------------------------------------------------------
enum eSi_CLOCK_INPUT
{
Si_CLKIN,
Si_XTAL,
Si_CMOS
};
struct Si5351_Channel
{
Si5351_Channel() : outputDivider(1), outputFreqHz(1), multisynthDivider(1), pllSource(0),
phaseOffset(0), powered(true), inverted(false), int_mode(false) {};
int outputDivider;
unsigned long outputFreqHz;
float multisynthDivider;
int pllSource;
float phaseOffset;
bool powered;
bool inverted;
bool int_mode;
};
struct Si5351_PLL
{
Si5351_PLL() : inputFreqHz(0), VCO_Hz(0), feedbackDivider(0), CLKIN_DIV(1), CLK_SRC(1) {}
unsigned long inputFreqHz;
float VCO_Hz;
float feedbackDivider;
int CLKIN_DIV;
int CLK_SRC; //0-XTAL, 1-CLKIN
};
class LMScomms;
class Si5351C
{
public:
enum Status
{
SUCCESS,
FAILED,
};
struct StatusBits
{
StatusBits() : sys_init(0), sys_init_stky(0), lol_b(0), lol_b_stky(0), lol_a(0), lol_a_stky(0), los(0), los_stky(0)
{
}
int sys_init;
int sys_init_stky;
int lol_b;
int lol_b_stky;
int lol_a;
int lol_a_stky;
int los;
int los_stky;
};
StatusBits GetStatusBits();
Status ClearStatus();
Si5351C();
~Si5351C();
void Initialize(LMScomms *mng);
bool LoadRegValuesFromFile(string FName);
void SetPLL(unsigned char id, unsigned long CLKIN_Hz, int CLK_SRC);
void SetClock(unsigned char id, unsigned long fOut_Hz, bool enabled = true, bool inverted = false);
Status UploadConfiguration();
Status ConfigureClocks();
void Reset();
private:
void FindVCO(Si5351_Channel *clocks, Si5351_PLL *plls, const unsigned long Fmin, const unsigned long Fmax);
LMScomms *device;
Si5351_PLL PLL[2];
Si5351_Channel CLK[8];
static const unsigned char m_defaultConfiguration[];
unsigned char m_newConfiguration[255];
};
#endif // SI5351C_MODULE
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/**
@file LMS7002M_statuses.cpp
@author Lime Microsystems (www.limemicro.com)
*/
#include "LMS7002M_statuses.h"
const char* undefinedStatusStr = "undefined status";
const char* liblms7_status2string(liblms7_status status)
{
if (status >= 0 && status < LIBLMS7_STATUS_COUNT)
return liblms7_status_strings[status];
else
return undefinedStatusStr;
}
This diff is collapsed.
[NewSection]
Key=Value
[Section2]
NewKey=Value
123=456
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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