summaryrefslogtreecommitdiffstats
path: root/host/lib/transport
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/transport')
-rwxr-xr-xhost/lib/transport/gen_vrt_if_packet.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/host/lib/transport/gen_vrt_if_packet.py b/host/lib/transport/gen_vrt_if_packet.py
index 7910ff60d..9b5bfca02 100755
--- a/host/lib/transport/gen_vrt_if_packet.py
+++ b/host/lib/transport/gen_vrt_if_packet.py
@@ -62,7 +62,10 @@ using namespace uhd::transport;
#set $tlr_p = 0b10000
static UHD_INLINE void pack_uint64_$(suffix)(boost::uint64_t num, boost::uint32_t *mem){
- *(reinterpret_cast<boost::uint64_t *>(mem)) = $(XE_MACRO)(num);
+ //*(reinterpret_cast<boost::uint64_t *>(mem)) = $(XE_MACRO)(num);
+ //second word is lower 32 bits due to fpga implementation
+ mem[1] = $(XE_MACRO)(boost::uint32_t(num >> 0));
+ mem[0] = $(XE_MACRO)(boost::uint32_t(num >> 32));
}
void vrt::if_hdr_pack_$(suffix)(
@@ -137,7 +140,10 @@ void vrt::if_hdr_pack_$(suffix)(
}
static UHD_INLINE void unpack_uint64_$(suffix)(boost::uint64_t &num, const boost::uint32_t *mem){
- num = $(XE_MACRO)(*reinterpret_cast<const boost::uint64_t *>(mem));
+ //num = $(XE_MACRO)(*reinterpret_cast<const boost::uint64_t *>(mem));
+ //second word is lower 32 bits due to fpga implementation
+ num = boost::uint64_t($(XE_MACRO)(mem[1])) << 0;
+ num |= boost::uint64_t($(XE_MACRO)(mem[0])) << 32;
}
void vrt::if_hdr_unpack_$(suffix)(