From b99d0f348eada0500ea5d668d5eba283afa6c4a4 Mon Sep 17 00:00:00 2001 From: Ashish Chaudhari Date: Tue, 28 May 2019 13:21:08 -0700 Subject: rfnoc: Added link/graph specific stream managers - Fleshed out mb_iface - Managers currently only export ctrl APIs. Data APIs TBD --- host/lib/rfnoc/client_zero.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'host/lib/rfnoc/client_zero.cpp') 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(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)); +} -- cgit v1.2.3