aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/client_zero.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-04-07 12:35:05 -0700
committerWade Fife <wade.fife@ettus.com>2020-04-09 08:44:40 -0500
commitc86bd938e7ff3debe1df09639e2479e02353ab17 (patch)
tree734d53dceb947a899e60e0ceaf35810771416846 /host/lib/rfnoc/client_zero.cpp
parent55e422535292c29de00b80f15b0a49ca3fb94f26 (diff)
downloaduhd-c86bd938e7ff3debe1df09639e2479e02353ab17.tar.gz
uhd-c86bd938e7ff3debe1df09639e2479e02353ab17.tar.bz2
uhd-c86bd938e7ff3debe1df09639e2479e02353ab17.zip
lib: Properly do reset routines in client_zero
The current reset routines write a '1' twice for reset, instead of '0' then '1' (resets get triggered on a rising edge).
Diffstat (limited to 'host/lib/rfnoc/client_zero.cpp')
-rw-r--r--host/lib/rfnoc/client_zero.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/host/lib/rfnoc/client_zero.cpp b/host/lib/rfnoc/client_zero.cpp
index 81ac5830d..ce39569ba 100644
--- a/host/lib/rfnoc/client_zero.cpp
+++ b/host/lib/rfnoc/client_zero.cpp
@@ -183,18 +183,22 @@ void client_zero::reset_ctrl(uint16_t portno)
{
_check_port_number(portno);
// The flush and reset registers are the second write register
+ // A reset gets triggered on the rising edge
+ regs().poke32(_get_port_base_addr(portno) + FLUSH_RESET_ADDR, 0);
regs().poke32(_get_port_base_addr(portno) + FLUSH_RESET_ADDR, (1 << 1) /* 1st bit */);
+ // We wait the requested time (see the RFNoC spec) before returning
std::this_thread::sleep_for(100us);
- regs().poke32(_get_port_base_addr(portno) + FLUSH_RESET_ADDR, (1 << 1));
}
void client_zero::reset_chdr(uint16_t portno)
{
_check_port_number(portno);
// The flush and reset registers are the second write register
+ // A reset gets triggered on the rising edge
+ regs().poke32(_get_port_base_addr(portno) + FLUSH_RESET_ADDR, 0);
regs().poke32(_get_port_base_addr(portno) + FLUSH_RESET_ADDR, (1 << 2) /* 2nd bit */);
+ // We wait the requested time (see the RFNoC spec) before returning
std::this_thread::sleep_for(1ms);
- regs().poke32(_get_port_base_addr(portno) + FLUSH_RESET_ADDR, (1 << 2));
}
client_zero::block_config_info client_zero::get_block_info(uint16_t portno)