From ea89fd0dd4e7bd9a4050f6ae2b79d3b359c60a9a Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 24 Oct 2019 13:30:59 -0700 Subject: 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. --- host/lib/rfnoc/chdr_rx_data_xport.cpp | 1 + host/lib/rfnoc/chdr_tx_data_xport.cpp | 1 + 2 files changed, 2 insertions(+) (limited to 'host/lib/rfnoc') 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 -- cgit v1.2.3