aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-11-08 11:38:19 -0800
committerMartin Braun <martin.braun@ettus.com>2018-03-16 10:48:46 -0700
commit60a911cd460ca1e29d838ee0039d67bf7c8fe7f3 (patch)
tree05182107d71ca74cb380c4081230b1130c797ec8 /host/lib/rfnoc
parent86dbaee5b80f203d1a9f28ced0307035d18368fa (diff)
downloaduhd-60a911cd460ca1e29d838ee0039d67bf7c8fe7f3.tar.gz
uhd-60a911cd460ca1e29d838ee0039d67bf7c8fe7f3.tar.bz2
uhd-60a911cd460ca1e29d838ee0039d67bf7c8fe7f3.zip
rfnoc/x300: Make sure peek32() and peek64() are called with actual addresses
Before, we were calling peeks with the number of the readback register.
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r--host/lib/rfnoc/radio_ctrl_impl.cpp10
-rw-r--r--host/lib/rfnoc/wb_iface_adapter.cpp4
2 files changed, 5 insertions, 9 deletions
diff --git a/host/lib/rfnoc/radio_ctrl_impl.cpp b/host/lib/rfnoc/radio_ctrl_impl.cpp
index 1de854266..fe8d51468 100644
--- a/host/lib/rfnoc/radio_ctrl_impl.cpp
+++ b/host/lib/rfnoc/radio_ctrl_impl.cpp
@@ -72,13 +72,9 @@ radio_ctrl_impl::radio_ctrl_impl() :
if (i == 0) {
time_core_3000::readback_bases_type time64_rb_bases;
- time64_rb_bases.rb_now = regs::RB_TIME_NOW;
- time64_rb_bases.rb_pps = regs::RB_TIME_PPS;
- _time64 = time_core_3000::make(
- _perifs[i].ctrl,
- regs::sr_addr(regs::TIME),
- time64_rb_bases
- );
+ time64_rb_bases.rb_now = regs::rb_addr(regs::RB_TIME_NOW);
+ time64_rb_bases.rb_pps = regs::rb_addr(regs::RB_TIME_PPS);
+ _time64 = time_core_3000::make(_perifs[i].ctrl, regs::sr_addr(regs::TIME), time64_rb_bases);
this->set_time_now(0.0);
}
diff --git a/host/lib/rfnoc/wb_iface_adapter.cpp b/host/lib/rfnoc/wb_iface_adapter.cpp
index 00e2b466a..3b9202661 100644
--- a/host/lib/rfnoc/wb_iface_adapter.cpp
+++ b/host/lib/rfnoc/wb_iface_adapter.cpp
@@ -42,12 +42,12 @@ void wb_iface_adapter::poke32(const wb_addr_type addr, const uint32_t data)
uint32_t wb_iface_adapter::peek32(const wb_addr_type addr)
{
- return peek32_functor(addr);
+ return peek32_functor(addr / 8);
}
uint64_t wb_iface_adapter::peek64(const wb_addr_type addr)
{
- return peek64_functor(addr);
+ return peek64_functor(addr / 8);
}
uhd::time_spec_t wb_iface_adapter::get_time(void)