aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-10-24 13:30:59 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 12:21:32 -0800
commitea89fd0dd4e7bd9a4050f6ae2b79d3b359c60a9a (patch)
treea18dfb692d9f2cff6a4df9ca3743aa189e74c6ed /host/lib/rfnoc
parentb4ef7ca804be35830a2c8ac5a143afafd33362f6 (diff)
downloaduhd-ea89fd0dd4e7bd9a4050f6ae2b79d3b359c60a9a.tar.gz
uhd-ea89fd0dd4e7bd9a4050f6ae2b79d3b359c60a9a.tar.bz2
uhd-ea89fd0dd4e7bd9a4050f6ae2b79d3b359c60a9a.zip
rfnoc: xports: Count FC bytes as multiples of CHDR width
SEPs on the FPGA can only occupy multiples of the CHDR width in their FIFOs, unlike SW, where buffers are stored in RAM and can be aligned anyhow. Therefore, we align the counting of bytes for FC purpose and count multiples of CHDR width instead of the true number of bytes per packet.
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r--host/lib/rfnoc/chdr_rx_data_xport.cpp1
-rw-r--r--host/lib/rfnoc/chdr_tx_data_xport.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/host/lib/rfnoc/chdr_rx_data_xport.cpp b/host/lib/rfnoc/chdr_rx_data_xport.cpp
index b0c68f2b4..df7162a73 100644
--- a/host/lib/rfnoc/chdr_rx_data_xport.cpp
+++ b/host/lib/rfnoc/chdr_rx_data_xport.cpp
@@ -40,6 +40,7 @@ chdr_rx_data_xport::chdr_rx_data_xport(uhd::transport::io_service::sptr io_srv,
: _fc_state(epids, fc_params.freq)
, _fc_sender(pkt_factory, epids)
, _epid(epids.second)
+ , _chdr_w_bytes(chdr_w_to_bits(pkt_factory.get_chdr_w()) / 8)
{
UHD_LOG_TRACE("XPORT::RX_DATA_XPORT",
"Creating rx xport with local epid=" << epids.second
diff --git a/host/lib/rfnoc/chdr_tx_data_xport.cpp b/host/lib/rfnoc/chdr_tx_data_xport.cpp
index 550dde59a..bb9d1b63e 100644
--- a/host/lib/rfnoc/chdr_tx_data_xport.cpp
+++ b/host/lib/rfnoc/chdr_tx_data_xport.cpp
@@ -35,6 +35,7 @@ chdr_tx_data_xport::chdr_tx_data_xport(uhd::transport::io_service::sptr io_srv,
: _fc_state(fc_params.buff_capacity)
, _fc_sender(pkt_factory, epids)
, _epid(epids.first)
+ , _chdr_w_bytes(chdr_w_to_bits(pkt_factory.get_chdr_w()) / 8)
{
UHD_LOG_TRACE("XPORT::TX_DATA_XPORT",
"Creating tx xport with local epid=" << epids.first