USRP Hardware Driver and Device Manual  Version: 4.10.0.0-0-g2af4ddb9
UHD and USRP Manual
uhd::rfnoc::dram Namespace Reference

Functions

UHD_API void upload (rfnoc_graph::sptr graph, const void *buff, const size_t nsamps, const std::string &cpu_fmt, const std::string &otw_fmt="sc16", replay_block_control::sptr replay=nullptr, size_t port=0, size_t offset=0)
 
UHD_API void download (rfnoc_graph::sptr graph, const void *buff, const size_t nsamps, const std::string &cpu_fmt, const std::string &otw_fmt="sc16", replay_block_control::sptr replay=nullptr, size_t port=0, size_t offset=0)
 

Detailed Description

Contains functions to facilitate sending and receiving samples to/from a RFNoC replay block.

Function Documentation

◆ download()

UHD_API void uhd::rfnoc::dram::download ( rfnoc_graph::sptr  graph,
const void *  buff,
const size_t  nsamps,
const std::string &  cpu_fmt,
const std::string &  otw_fmt = "sc16",
replay_block_control::sptr  replay = nullptr,
size_t  port = 0,
size_t  offset = 0 
)

Receives data from an RFNoC replay block

This receives samples from an RFNoC replay block. It handles common data losses that can occur when receiving data over a network interface using UDP. If a block is connected to the input port of the replay block it will be temporarily disconnected and reconnected after transfer.

Parameters
graphRFNoc graph to operate on
buffbuffer to received data into
nsampsnumber of samples in buff
cpu_fmtformat of the data in buff, must match the data in buff
otw_fmtformat of the data over the wire, there must be a matching converter between cpu_fmt and otw_fmt (default: "sc16")
replayReplay block to send the data to (default: nullptr, will use the first available)
portoutput port to be used on the replay block (default: 0)
offsetoffset in the replay where to read the data (default: 0)

◆ upload()

UHD_API void uhd::rfnoc::dram::upload ( rfnoc_graph::sptr  graph,
const void *  buff,
const size_t  nsamps,
const std::string &  cpu_fmt,
const std::string &  otw_fmt = "sc16",
replay_block_control::sptr  replay = nullptr,
size_t  port = 0,
size_t  offset = 0 
)

Send samples to a RFNoC replay block.

This sends samples to a RFNoC replay block. It handles common data losses that can occur when sending data over a network interface using UDP. The stream buffer has to be a one dimensional array. If a block is connected to the input port of the replay block it will be temporarily disconnected and reconnected after transfer.

Parameters
graphRFNoC graph to operate on
buffbuffer to be sent
nsampsnumber of samples in buff
cpu_fmtformat of the data in buff, must match the data in buff
otw_fmtformat of the data over the wire, there must be a matching converter between cpu_fmt and otw_fmt (default: "sc16")
replayReplay block to send the data to (default: nullptr, will use the first available)
portinput port to be used on the replay block (default: 0)
offsetoffset in the replay where to store the data (default: 0)