aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp
diff options
context:
space:
mode:
authorrobot-rover <sam.obrien@ni.com>2020-06-11 16:34:07 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2020-07-13 15:21:52 -0500
commit22837edfe20feb57c24f2a55edbb65757b3fab6a (patch)
treea7aed19205f2851ab8e32e52093fbbe761ac9e86 /host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp
parentb0cb065111dc3f40b89bdda76e9bd98f3e70b72e (diff)
downloaduhd-22837edfe20feb57c24f2a55edbb65757b3fab6a.tar.gz
uhd-22837edfe20feb57c24f2a55edbb65757b3fab6a.tar.bz2
uhd-22837edfe20feb57c24f2a55edbb65757b3fab6a.zip
utils: Expose CHDR Types in Public API
This commit exposes uhdlib/rfnoc/chdr_types.hpp in the public includes. Additionally, it takes some types from uhdlib/rfnoc/rfnoc_common.hpp and exposes them publicly in uhd/rfnoc/rfnoc_types.hpp. Finally, one constant is moved from uhdlib/rfnoc/rfnoc_common.hpp to uhd/rfnoc/constants.hpp Signed-off-by: robot-rover <sam.obrien@ni.com>
Diffstat (limited to 'host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp')
-rw-r--r--host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp b/host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp
index 9c4944fe2..7b2900832 100644
--- a/host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp
+++ b/host/lib/include/uhdlib/rfnoc/rfnoc_common.hpp
@@ -7,7 +7,7 @@
#pragma once
#include <uhd/rfnoc/defaults.hpp>
-#include <uhdlib/transport/link_if.hpp>
+#include <uhd/rfnoc/rfnoc_types.hpp>
#include <memory>
namespace uhd { namespace rfnoc {
@@ -16,25 +16,6 @@ namespace uhd { namespace rfnoc {
// Types
//----------------------------------------------
-//! Type that indicates the CHDR Width in bits
-enum chdr_w_t { CHDR_W_64 = 0, CHDR_W_128 = 1, CHDR_W_256 = 2, CHDR_W_512 = 3 };
-//! Conversion from chdr_w_t to a number of bits
-constexpr size_t chdr_w_to_bits(chdr_w_t chdr_w)
-{
- switch (chdr_w) {
- case CHDR_W_64:
- return 64;
- case CHDR_W_128:
- return 128;
- case CHDR_W_256:
- return 256;
- case CHDR_W_512:
- return 512;
- default:
- return 0;
- }
-}
-
//! Device ID Type
using device_id_t = uint16_t;
//! Stream Endpoint Instance Number Type
@@ -43,8 +24,6 @@ using sep_inst_t = uint16_t;
using sep_addr_t = std::pair<device_id_t, sep_inst_t>;
//! Stream Endpoint Physical Address Type (first = source, second = destination)
using sep_addr_pair_t = std::pair<sep_addr_t, sep_addr_t>;
-//! Stream Endpoint ID Type
-using sep_id_t = uint16_t;
//! Stream Endpoint pair Type (first = source, second = destination)
using sep_id_pair_t = std::pair<sep_id_t, sep_id_t>;
//! Stream Endpoint Virtual Channel Type
@@ -85,8 +64,6 @@ constexpr sw_buff_t bits_to_sw_buff(size_t bits)
// Constants
//----------------------------------------------
-constexpr uint16_t RFNOC_PROTO_VER = 0x0100;
-
constexpr uint64_t MAX_FC_CAPACITY_BYTES = (uint64_t(1) << 40) - 1;
constexpr uint32_t MAX_FC_CAPACITY_PKTS = (uint32_t(1) << 24) - 1;
constexpr uint64_t MAX_FC_FREQ_BYTES = (uint64_t(1) << 40) - 1;