aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r--host/lib/rfnoc/CMakeLists.txt3
-rw-r--r--host/lib/rfnoc/chdr/CMakeLists.txt15
-rw-r--r--host/lib/rfnoc/chdr_ctrl_endpoint.cpp6
-rw-r--r--host/lib/rfnoc/chdr_packet.cpp (renamed from host/lib/rfnoc/chdr/chdr_packet.cpp)7
-rw-r--r--host/lib/rfnoc/chdr_types.cpp (renamed from host/lib/rfnoc/chdr/chdr_types.cpp)2
-rw-r--r--host/lib/rfnoc/ctrlport_endpoint.cpp4
-rw-r--r--host/lib/rfnoc/mgmt_portal.cpp2
7 files changed, 13 insertions, 26 deletions
diff --git a/host/lib/rfnoc/CMakeLists.txt b/host/lib/rfnoc/CMakeLists.txt
index 4b36a8db4..45904a572 100644
--- a/host/lib/rfnoc/CMakeLists.txt
+++ b/host/lib/rfnoc/CMakeLists.txt
@@ -20,6 +20,8 @@ LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/block_ctrl_impl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/blockdef_xml_impl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/block_id.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/chdr_types.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/chdr_packet.cpp
${CMAKE_CURRENT_SOURCE_DIR}/client_zero.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ctrl_iface.cpp
${CMAKE_CURRENT_SOURCE_DIR}/graph_impl.cpp
@@ -58,5 +60,4 @@ LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/replay_block_ctrl_impl.cpp
)
-INCLUDE_SUBDIRECTORY(chdr)
INCLUDE_SUBDIRECTORY(nocscript)
diff --git a/host/lib/rfnoc/chdr/CMakeLists.txt b/host/lib/rfnoc/chdr/CMakeLists.txt
deleted file mode 100644
index fca46fe4a..000000000
--- a/host/lib/rfnoc/chdr/CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright 2014-2015,2017 Ettus Research LLC
-# Copyright 2018 Ettus Research, a National Instruments Company
-#
-# SPDX-License-Identifier: GPL-3.0-or-later
-#
-
-########################################################################
-# This file included, use CMake directory variables
-########################################################################
-
-LIBUHD_APPEND_SOURCES(
- ${CMAKE_CURRENT_SOURCE_DIR}/chdr_types.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/chdr_packet.cpp
-)
diff --git a/host/lib/rfnoc/chdr_ctrl_endpoint.cpp b/host/lib/rfnoc/chdr_ctrl_endpoint.cpp
index 6ded83c0f..fadba566e 100644
--- a/host/lib/rfnoc/chdr_ctrl_endpoint.cpp
+++ b/host/lib/rfnoc/chdr_ctrl_endpoint.cpp
@@ -8,13 +8,13 @@
#include <uhd/utils/log.hpp>
#include <uhd/utils/safe_call.hpp>
#include <uhd/utils/thread.hpp>
-#include <uhdlib/rfnoc/chdr/chdr_packet.hpp>
-#include <uhdlib/rfnoc/chdr/chdr_types.hpp>
#include <uhdlib/rfnoc/chdr_ctrl_endpoint.hpp>
+#include <uhdlib/rfnoc/chdr_packet.hpp>
+#include <uhdlib/rfnoc/chdr_types.hpp>
#include <boost/format.hpp>
+#include <atomic>
#include <mutex>
#include <thread>
-#include <atomic>
using namespace uhd;
using namespace uhd::rfnoc;
diff --git a/host/lib/rfnoc/chdr/chdr_packet.cpp b/host/lib/rfnoc/chdr_packet.cpp
index b058115ab..653181c04 100644
--- a/host/lib/rfnoc/chdr/chdr_packet.cpp
+++ b/host/lib/rfnoc/chdr_packet.cpp
@@ -4,12 +4,13 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include <uhdlib/rfnoc/chdr/chdr_packet.hpp>
+#include <uhdlib/rfnoc/chdr_packet.hpp>
#include <cassert>
#include <functional>
#include <memory>
using namespace uhd;
+using namespace uhd::rfnoc;
using namespace uhd::rfnoc::chdr;
chdr_packet::~chdr_packet() = default;
@@ -17,7 +18,7 @@ chdr_packet::~chdr_packet() = default;
//------------------------------------------------------------
// chdr_packet
//------------------------------------------------------------
-
+// endianness is the link endianness, not the host endianness
template <size_t chdr_w, endianness_t endianness>
class chdr_packet_impl : public chdr_packet
{
@@ -39,7 +40,7 @@ public:
_pkt_buff = reinterpret_cast<uint64_t*>(pkt_buff);
_pkt_buff[0] = u64_from_host(header);
if (_has_timestamp(header)) {
- _pkt_buff[1] = timestamp;
+ _pkt_buff[1] = u64_from_host(timestamp);
}
_compute_mdata_offset();
}
diff --git a/host/lib/rfnoc/chdr/chdr_types.cpp b/host/lib/rfnoc/chdr_types.cpp
index 8920e4fe3..0e30dca7e 100644
--- a/host/lib/rfnoc/chdr/chdr_types.cpp
+++ b/host/lib/rfnoc/chdr_types.cpp
@@ -6,7 +6,7 @@
#include <uhd/exception.hpp>
#include <uhd/types/endianness.hpp>
-#include <uhdlib/rfnoc/chdr/chdr_types.hpp>
+#include <uhdlib/rfnoc/chdr_types.hpp>
#include <boost/format.hpp>
#include <cassert>
diff --git a/host/lib/rfnoc/ctrlport_endpoint.cpp b/host/lib/rfnoc/ctrlport_endpoint.cpp
index d5f4ef98c..93236940f 100644
--- a/host/lib/rfnoc/ctrlport_endpoint.cpp
+++ b/host/lib/rfnoc/ctrlport_endpoint.cpp
@@ -6,8 +6,8 @@
#include <uhd/exception.hpp>
#include <uhd/utils/log.hpp>
-#include <uhdlib/rfnoc/chdr/chdr_packet.hpp>
-#include <uhdlib/rfnoc/chdr/chdr_types.hpp>
+#include <uhdlib/rfnoc/chdr_packet.hpp>
+#include <uhdlib/rfnoc/chdr_types.hpp>
#include <uhdlib/rfnoc/ctrlport_endpoint.hpp>
#include <condition_variable>
#include <boost/format.hpp>
diff --git a/host/lib/rfnoc/mgmt_portal.cpp b/host/lib/rfnoc/mgmt_portal.cpp
index fcb19997e..76d708a0e 100644
--- a/host/lib/rfnoc/mgmt_portal.cpp
+++ b/host/lib/rfnoc/mgmt_portal.cpp
@@ -7,7 +7,7 @@
#include <uhd/exception.hpp>
#include <uhd/utils/log.hpp>
-#include <uhdlib/rfnoc/chdr/chdr_packet.hpp>
+#include <uhdlib/rfnoc/chdr_packet.hpp>
#include <uhdlib/rfnoc/mgmt_portal.hpp>
#include <unordered_set>
#include <boost/format.hpp>