aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-01-22 09:47:21 -0800
committerMartin Braun <martin.braun@ettus.com>2018-02-19 14:51:47 -0800
commiteff796f64b1e05036b7eca2185f53528a0de870b (patch)
treea470a6d1f3f3d2bb8a422b8b7f3815f2924c766c /host/lib/include
parent1adae2b432d1b66d7b9133a67fedce8af0b6b560 (diff)
downloaduhd-eff796f64b1e05036b7eca2185f53528a0de870b.tar.gz
uhd-eff796f64b1e05036b7eca2185f53528a0de870b.tar.bz2
uhd-eff796f64b1e05036b7eca2185f53528a0de870b.zip
rfnoc: Factored out FPGA compat check
- Applied changes to DUC and DDC blocks - Fixed minor formatting
Diffstat (limited to 'host/lib/include')
-rw-r--r--host/lib/include/uhdlib/utils/compat_check.hpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/utils/compat_check.hpp b/host/lib/include/uhdlib/utils/compat_check.hpp
new file mode 100644
index 000000000..acdf97340
--- /dev/null
+++ b/host/lib/include/uhdlib/utils/compat_check.hpp
@@ -0,0 +1,30 @@
+//
+// Copyright 2018 Ettus Research, a National Instruments Company
+//
+// SPDX-License-Identifier: GPL-3.0
+//
+
+#ifndef INCLUDED_UHDLIB_UTILS_COMPATCHECK_HPP
+#define INCLUDED_UHDLIB_UTILS_COMPATCHECK_HPP
+
+#include <cstddef>
+#include <string>
+
+namespace uhd {
+
+ /*! Checks for FPGA compatibility, and throws an exception on mismatch.
+ *
+ * \throws uhd::runtime_error on mismatch.
+ */
+ void assert_fpga_compat(
+ const size_t uhd_major,
+ const size_t uhd_minor,
+ const uint64_t fpga_compat,
+ const std::string& fpga_component,
+ const std::string& log_component,
+ const bool fail_on_minor_behind=false
+ );
+
+} /* namespace uhd */
+
+#endif /* INCLUDED_UHDLIB_UTILS_COMPATCHECK_HPP */