summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp24
-rw-r--r--host/lib/usrp/b200/b200_impl.hpp2
-rw-r--r--host/lib/usrp/b200/b200_regs.hpp1
-rw-r--r--host/lib/usrp/cores/time_core_3000.cpp24
-rw-r--r--host/lib/usrp/cores/time_core_3000.hpp6
5 files changed, 9 insertions, 48 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 4c70e7f7b..8bacaf764 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -293,11 +293,7 @@ b200_impl::b200_impl(const device_addr_t &device_addr)
// Initialize the properties tree
////////////////////////////////////////////////////////////////////
_tree->create<std::string>("/name").set("B-Series Device");
- switch (boost::lexical_cast<boost::uint16_t>(mb_eeprom["product"]))
- {
- case 0x0001: _tree->create<std::string>(mb_path / "name").set("B200"); break;
- case 0x0002: _tree->create<std::string>(mb_path / "name").set("B210"); break;
- }
+ _tree->create<std::string>(mb_path / "name").set("B200");
_tree->create<std::string>(mb_path / "codename").set("Sasquatch");
////////////////////////////////////////////////////////////////////
@@ -333,20 +329,12 @@ b200_impl::b200_impl(const device_addr_t &device_addr)
////////////////////////////////////////////////////////////////////
{
const fs_path codec_path = mb_path / ("rx_codecs") / "A";
- switch (boost::lexical_cast<boost::uint16_t>(mb_eeprom["product"]))
- {
- case 0x0001: _tree->create<std::string>(codec_path / "name").set("B200 RX dual ADC"); break;
- case 0x0002: _tree->create<std::string>(codec_path / "name").set("B210 RX dual ADC"); break;
- }
+ _tree->create<std::string>(codec_path / "name").set("B200 RX dual ADC");
_tree->create<int>(codec_path / "gains"); //empty cuz gains are in frontend
}
{
const fs_path codec_path = mb_path / ("tx_codecs") / "A";
- switch (boost::lexical_cast<boost::uint16_t>(mb_eeprom["product"]))
- {
- case 0x0001: _tree->create<std::string>(codec_path / "name").set("B200 TX dual DAC"); break;
- case 0x0002: _tree->create<std::string>(codec_path / "name").set("B210 TX dual DAC"); break;
- }
+ _tree->create<std::string>(codec_path / "name").set("B200 TX dual DAC");
_tree->create<int>(codec_path / "gains"); //empty cuz gains are in frontend
}
@@ -745,11 +733,7 @@ void b200_impl::update_time_source(const std::string &source)
else if (source == "external"){}
else if (source == "gpsdo"){}
else throw uhd::key_error("update_time_source: unknown source: " + source);
- for (size_t i = 0; i < _radio_perifs.size(); i++)
- {
- _radio_perifs[i].time64->set_time_source((source == "external")? "external" : "internal");
- }
- this->update_gpio_state();
+ _local_ctrl->poke32(TOREG(SR_CORE_PPS_SEL), (source == "external")? 1 : 0);
}
/***********************************************************************
diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp
index d8a2232e0..a59e0b977 100644
--- a/host/lib/usrp/b200/b200_impl.hpp
+++ b/host/lib/usrp/b200/b200_impl.hpp
@@ -50,7 +50,7 @@ static const std::string B200_FPGA_FILE_NAME = "usrp_b200_fpga.bin";
static const std::string B210_FPGA_FILE_NAME = "usrp_b210_fpga.bin";
static const boost::uint8_t B200_FW_COMPAT_NUM_MAJOR = 0x02;
static const boost::uint8_t B200_FW_COMPAT_NUM_MINOR = 0x00;
-static const boost::uint16_t B200_FPGA_COMPAT_NUM = 0x01;
+static const boost::uint16_t B200_FPGA_COMPAT_NUM = 0x02;
static const double B200_LINK_RATE_BPS = (5e9)/8; //practical link rate (5 Gbps)
static const double B200_BUS_CLOCK_RATE = 100e6;
static const double B200_DEFAULT_TICK_RATE = 32e6;
diff --git a/host/lib/usrp/b200/b200_regs.hpp b/host/lib/usrp/b200/b200_regs.hpp
index 0e4cc82cd..ae39b95b2 100644
--- a/host/lib/usrp/b200/b200_regs.hpp
+++ b/host/lib/usrp/b200/b200_regs.hpp
@@ -28,6 +28,7 @@ localparam SR_CORE_SPI = 8;
localparam SR_CORE_MISC = 16;
localparam SR_CORE_COMPAT = 24;
localparam SR_CORE_GPSDO_ST = 40;
+localparam SR_CORE_PPS_SEL = 48;
localparam RB32_CORE_SPI = 8;
localparam RB32_CORE_MISC = 16;
localparam RB32_CORE_STATUS = 20;
diff --git a/host/lib/usrp/cores/time_core_3000.cpp b/host/lib/usrp/cores/time_core_3000.cpp
index 8b5ad927a..45ff55271 100644
--- a/host/lib/usrp/cores/time_core_3000.cpp
+++ b/host/lib/usrp/cores/time_core_3000.cpp
@@ -24,9 +24,8 @@
#define REG_TIME_LO _base + 4
#define REG_TIME_CTRL _base + 8
-#define CTRL_LATCH_TIME_PPS (1 << 2)
-#define CTRL_LATCH_TIME_NOW (1 << 1)
-#define CTRL_SELECT_EXT_PPS (1 << 0)
+#define CTRL_LATCH_TIME_PPS (1 << 1)
+#define CTRL_LATCH_TIME_NOW (1 << 0)
using namespace uhd;
@@ -41,7 +40,6 @@ struct time_core_3000_impl : time_core_3000
_readback_bases(readback_bases)
{
this->set_tick_rate(1); //init to non zero
- this->set_time_source("internal");
}
~time_core_3000_impl(void)
@@ -102,29 +100,13 @@ struct time_core_3000_impl : time_core_3000
const boost::uint64_t ticks = time.to_ticks(_tick_rate);
_iface->poke32(REG_TIME_HI, boost::uint32_t(ticks >> 32));
_iface->poke32(REG_TIME_LO, boost::uint32_t(ticks >> 0));
- _iface->poke32(REG_TIME_CTRL, (_use_ext_pps?CTRL_SELECT_EXT_PPS:0) | CTRL_LATCH_TIME_PPS);
- }
-
- void set_time_source(const std::string &source)
- {
- if (source == "internal") _use_ext_pps = false;
- else if (source == "external") _use_ext_pps = true;
- else throw uhd::runtime_error("time_core_3000: set_time_source unknown source: " + source);
- }
-
- std::vector<std::string> get_time_sources(void)
- {
- std::vector<std::string> sources;
- sources.push_back("internal");
- sources.push_back("external");
- return sources;
+ _iface->poke32(REG_TIME_CTRL, CTRL_LATCH_TIME_PPS);
}
wb_iface::sptr _iface;
const size_t _base;
const readback_bases_type _readback_bases;
double _tick_rate;
- bool _use_ext_pps;
};
time_core_3000::sptr time_core_3000::make(
diff --git a/host/lib/usrp/cores/time_core_3000.hpp b/host/lib/usrp/cores/time_core_3000.hpp
index f2b684ccf..ffe2f4133 100644
--- a/host/lib/usrp/cores/time_core_3000.hpp
+++ b/host/lib/usrp/cores/time_core_3000.hpp
@@ -23,8 +23,6 @@
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
#include "wb_iface.hpp"
-#include <string>
-#include <vector>
class time_core_3000 : boost::noncopyable
{
@@ -55,10 +53,6 @@ public:
virtual void set_time_next_pps(const uhd::time_spec_t &time) = 0;
- virtual void set_time_source(const std::string &source) = 0;
-
- virtual std::vector<std::string> get_time_sources(void) = 0;
-
};
#endif /* INCLUDED_LIBUHD_USRP_TIME_CORE_3000_HPP */