Skip to content

Commit

Permalink
Release 19.04.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignas J committed May 13, 2019
2 parents ed5214e + ec615f4 commit abf8214
Show file tree
Hide file tree
Showing 55 changed files with 1,902 additions and 330 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ if(CMAKE_COMPILER_IS_GNUCXX)

#default SIMD configuration uses native build flags
#when packaging and x86, use sse3 so the binaries work across multiple x86 variants
set(DEFAULT_SIMD_FLAGS "native")
if(NOT DEFAULT_SIMD_FLAGS)
set(DEFAULT_SIMD_FLAGS "native")
endif()
if ("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND X86)
set(DEFAULT_SIMD_FLAGS "SSE3")
endif()
Expand Down
19 changes: 19 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
Release 19.04.0 (2019-05-09)
==========================

LimeSuite library changes:
- Added support for LimeNet-Micro v2.1
- Fixed Tx ch.B calibration when Rx ch.B is disabled
- Added save and restore of analog DC/IQ calibration values when saving/loading INI file
- Fixed Rx only mode not working on LimeSDR-USB with sample rate <2.5 MSps
- Fixed Rx only mode not working on LimeSDR-USB with sample rate <2.5 MSps
- change coefficents in LMS7002M::GetTemperature() to approximately match actual temperature

LimeSuiteGUI:
- Updated "Board controls" panel for LimeNet-Micro

Other changes
- Added LimeNET-Micro support to LimeQuickTest
- LimeSDR-USB v1.4 updated to r2.21 gateware
- LimeSDR-Mini updated to r1.30 gateware

Release 19.01.0 (2019-01-08)
==========================

Expand Down
1 change: 1 addition & 0 deletions QuickTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ if(ENABLE_QUICKTEST)
LimeSDRTest.cpp
LimeSDRTest_Mini.cpp
LimeSDRTest_USB.cpp
LimeNET_Micro_Test.cpp
TestGUI.cpp
resources/resource.rc
${PROJECT_SOURCE_DIR}/external/kissFFT/kiss_fft.c)
Expand Down
131 changes: 131 additions & 0 deletions QuickTest/LimeNET_Micro_Test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
#include "LimeSDRTest.h"

using namespace lime;

int LimeNET_Micro_Test::ClockNetworkTest()
{
int ret = 0;
UpdateStatus(LMS_TEST_INFO, "->REF clock test");
if (GPIFClkTest() == -1)
{
UpdateStatus(LMS_TEST_INFO, "->REF clock test FAILED");
ret = -1;
}

UpdateStatus(LMS_TEST_INFO, "->ADF4002 Test");
if (ADF4002Test() == -1)
{
UpdateStatus(LMS_TEST_INFO, " FAILED");
ret = -1;
}

UpdateStatus(LMS_TEST_INFO, "->VCTCXO test");
if (VCTCXOTest() == -1)
{
UpdateStatus(LMS_TEST_INFO, " FAILED");
ret = -1;
}

return ret;
}


int LimeNET_Micro_Test::VCTCXOTest()
{
const uint8_t id = 0;
double val = 0;
unsigned count1;
unsigned count2;
double dac_value;
std::string units = "";
auto conn = device->GetConnection();

if (conn->CustomParameterRead(&id, &dac_value, 1, nullptr) != 0)
return -1;

auto restore_dac = [&,id](int ret){
if (conn->CustomParameterWrite(&id, &dac_value, 1, units) != 0)
return -1;
return ret;
};

if (conn->CustomParameterWrite(&id, &val, 1, units) != 0)
return -1;

if ((InitFPGATest(0x04, 1.0) & 0x4) != 0x4)
return restore_dac(-1);

uint32_t addr[] = { 0x72, 0x73 };
uint32_t vals[2];
if (conn->ReadRegisters(addr, vals, 2) != 0)
return restore_dac(-1);

count1 = vals[0] + (vals[1] << 16);
val = 65500;
if (conn->CustomParameterWrite(&id, &val, 1, units) != 0)
return -1;

if ((InitFPGATest(0x04, 1.0) & 0x4) != 0x4)
return restore_dac(-1);;

if (conn->ReadRegisters(addr, vals, 2) != 0)
return restore_dac(-1);;

count2 = vals[0] + (vals[1] << 16);
std::string str = " Results : " + std::to_string(count1) + " (min); " + std::to_string(count2) + " (max)";

if ((count1 + 16 > count2) || (count1 + 64 < count2))
{
str += " - FAILED";
UpdateStatus(LMS_TEST_INFO, str.c_str());
return restore_dac(-1);;
}
str += " - PASSED";
UpdateStatus(LMS_TEST_INFO, str.c_str());
return restore_dac(0);
}

int LimeNET_Micro_Test::RFTest()
{
auto testPath = [this](float rxfreq, int gain, int lbPath)->bool{
const float tx_offset = 2e6;
bool passed = true;
if (device->GetLMS()->SetFrequencySX(lime::LMS7002M::Tx, rxfreq+tx_offset)!=0)
return false;
if (device->GetLMS()->SetFrequencySX(lime::LMS7002M::Rx, rxfreq)!=0)
return false;
RFTestData testinfo = {rxfreq, rxfreq+tx_offset, -14, tx_offset, 0};
device->GetLMS()->Modify_SPI_Reg_bits(LMS7param(MAC), 1); //channel A
device->GetLMS()->SetPathRFE(lbPath==2 ? LMS7002M::PATH_RFE_LB2 : LMS7002M::PATH_RFE_LB1);
device->GetLMS()->SetBandTRF(lbPath);
if (lbPath==1)
device->GetLMS()->Modify_SPI_Reg_bits(LMS7param(SEL_PATH_RFE), 1);
if (device->GetConnection()->WriteRegister(0x17, lbPath==1? 0x5601:0x6501) != 0)
return false;

device->WriteParam(LMS7_G_RXLOOPB_RFE, gain);
bool testPassed = RunTest(testinfo.peakval,testinfo.peakfreq, 0);
std::string str = RFTestInfo(testinfo, testPassed);
UpdateStatus(LMS_TEST_INFO, str.c_str());
if (testPassed == false)
passed = false;
return passed;
};
UpdateStatus(LMS_TEST_INFO, "->Configure LMS");
device->Init();
if (device->SetRate(8e6, 0)!=0)
{
UpdateStatus(LMS_TEST_FAIL, "Failed to set sample rate");
return -1;
}

device->EnableChannel(true, 0, true);
device->SetTestSignal(true, 0, LMS_TESTSIG_DC, 0x6000, 0x6000);
UpdateStatus(LMS_TEST_INFO, "->Testing using internal LMS7002M loopback");
UpdateStatus(LMS_TEST_INFO, "->Run Tests (TX_1-> LNA_H):");
bool passed = testPath(1800e6, 5, 1);
UpdateStatus(LMS_TEST_INFO, "->Run Tests (TX_2 -> LNA_L):");
passed &= testPath(750e6, 2, 2);

return passed ? 0 : -1;
}
23 changes: 16 additions & 7 deletions QuickTest/LimeSDRTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,32 @@ LimeSDRTest* LimeSDRTest::Connect()
return nullptr;
}

std::string str = "->Device: ";
str += handles[0].serialize();
UpdateStatus(LMS_TEST_INFO, str.c_str());
if (str.find("USB 3") == std::string::npos)
auto info = dev->GetInfo();
if (strstr(info->deviceName, lime::GetDeviceName(lime::LMS_DEV_LIMESDR))
|| strstr(info->deviceName, lime::GetDeviceName(lime::LMS_DEV_LIMESDRMINI)))
{
str = "Warning: USB3 not available";
std::string str = "->Device: ";
str += handles[0].serialize();
UpdateStatus(LMS_TEST_INFO, str.c_str());
if (str.find("USB 3") == std::string::npos)
{
str = "Warning: USB3 not available";
UpdateStatus(LMS_TEST_INFO, str.c_str());
}
UpdateStatus(LMS_TEST_LOGFILE, handles[0].serial.c_str());
}
UpdateStatus(LMS_TEST_LOGFILE, handles[0].serial.c_str());

auto info = dev->GetInfo();
if (strstr(info->deviceName, lime::GetDeviceName(lime::LMS_DEV_LIMESDR)))
return new LimeSDRTest_USB(dev);
else if (strstr(info->deviceName, lime::GetDeviceName(lime::LMS_DEV_LIMESDRMINI)))
return new LimeSDRTest_Mini(dev);
else if (handles[0].media.find("USB")!=std::string::npos && strstr(info->deviceName, lime::GetDeviceName(lime::LMS_DEV_LIMENET_MICRO)))
return new LimeNET_Micro_Test(dev);
else
{
UpdateStatus(LMS_TEST_FAIL, "Board not supported");
return nullptr;
}

}

Expand Down
15 changes: 13 additions & 2 deletions QuickTest/LimeSDRTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class LimeSDRTest
static void UpdateStatus(int event, const char* msg = nullptr);
int InitFPGATest(unsigned test, double timeout);
int GPIFClkTest();
int VCTCXOTest();
virtual int VCTCXOTest();
bool RunTest(float &peakval, float &peakFreq, int ch = 0);
static std::string RFTestInfo(const RFTestData& data, bool passed);
lime::LMS7_Device* device;
Expand Down Expand Up @@ -86,11 +86,22 @@ class LimeSDRTest_Mini : public LimeSDRTest
class LimeSDRTest_USB : public LimeSDRTest
{
friend class LimeSDRTest;
LimeSDRTest_USB(lime::LMS7_Device* dev):LimeSDRTest(dev){};

int ClockNetworkTest() override;
int RFTest() override;
int Si5351CTest();
protected:
int ADF4002Test();
LimeSDRTest_USB(lime::LMS7_Device* dev):LimeSDRTest(dev){};
};

class LimeNET_Micro_Test : public LimeSDRTest_USB
{
friend class LimeSDRTest;
LimeNET_Micro_Test(lime::LMS7_Device* dev):LimeSDRTest_USB(dev){};
int ClockNetworkTest() override;
int VCTCXOTest() override;
int RFTest() override;
};

#endif /* LIMESDRTEST_H */
Expand Down
2 changes: 1 addition & 1 deletion SoapyLMS7/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ std::complex<double> SoapyLMS7::getDCOffset(const int direction, const size_t ch

bool SoapyLMS7::hasIQBalance(const int /*direction*/, const size_t /*channel*/) const
{
return false;
return true;
}

void SoapyLMS7::setIQBalance(const int direction, const size_t channel, const std::complex<double> &balance)
Expand Down
Loading

0 comments on commit abf8214

Please sign in to comment.