diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2019-05-28 13:21:08 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:20 -0800 |
commit | b99d0f348eada0500ea5d668d5eba283afa6c4a4 (patch) | |
tree | bed87ff733aab37c7d5d3851f5cc5cbcffe056d4 /host/lib/rfnoc/client_zero.cpp | |
parent | 374b30cc0eb0842e567d01486d9be8155e361d9f (diff) | |
download | uhd-b99d0f348eada0500ea5d668d5eba283afa6c4a4.tar.gz uhd-b99d0f348eada0500ea5d668d5eba283afa6c4a4.tar.bz2 uhd-b99d0f348eada0500ea5d668d5eba283afa6c4a4.zip |
rfnoc: Added link/graph specific stream managers
- Fleshed out mb_iface
- Managers currently only export ctrl APIs. Data APIs TBD
Diffstat (limited to 'host/lib/rfnoc/client_zero.cpp')
-rw-r--r-- | host/lib/rfnoc/client_zero.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/host/lib/rfnoc/client_zero.cpp b/host/lib/rfnoc/client_zero.cpp index 82c44eaf4..aaecdcbf5 100644 --- a/host/lib/rfnoc/client_zero.cpp +++ b/host/lib/rfnoc/client_zero.cpp @@ -213,3 +213,21 @@ uint32_t client_zero::_get_flush_status_flags(uint16_t portno) // The flush status flags are in the third register of the port return regs().peek32(_get_port_base_addr(portno) + 8); } + +client_zero::sptr client_zero::make(chdr_ctrl_endpoint& chdr_ctrl_ep, sep_id_t dst_epid) +{ + // Create a control port endpoint for client zero + static constexpr uint16_t CLIENT_ZERO_PORT = 0; + static constexpr size_t CLIENT_ZERO_BUFF_CAPACITY = 32; + static constexpr size_t CLIENT_ZERO_MAX_ASYNC_MSGS = 0; + static clock_iface client_zero_clk{"client_zero"}; + client_zero_clk.set_running(true); // Client zero clock must be always-on. + client_zero_clk.set_freq(100e6); // The freq is unused. No timed ops or sleeps. + + return std::make_shared<client_zero>(chdr_ctrl_ep.get_ctrlport_ep(dst_epid, + CLIENT_ZERO_PORT, + CLIENT_ZERO_BUFF_CAPACITY, + CLIENT_ZERO_MAX_ASYNC_MSGS, + client_zero_clk, + client_zero_clk)); +} |