summaryrefslogtreecommitdiffstats
path: root/host/lib/transport
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-07-08 00:16:05 +0000
committerJosh Blum <josh@joshknows.com>2010-07-08 00:16:05 +0000
commitad511bd81d726918a11ab1218a4bc48f8eaf6efe (patch)
tree92b0ecda8231879209df953b6174cf547da74119 /host/lib/transport
parentb285d23f5eba9b65f9baf799fee3f1389c132632 (diff)
parent516b722fa17123b6ae95b551c71f0b052d129f78 (diff)
downloaduhd-ad511bd81d726918a11ab1218a4bc48f8eaf6efe.tar.gz
uhd-ad511bd81d726918a11ab1218a4bc48f8eaf6efe.tar.bz2
uhd-ad511bd81d726918a11ab1218a4bc48f8eaf6efe.zip
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e_wip
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)(