Hi,
I created a simple example that implements an RFNoC graph between the
Replay block and the Radio block on an N310 using UHD 4.1.0.5. The idea is
that Replay Port 0 connects to the Tx Radio for playing out samples and
then the same Rx Radio connects to Replay Port 1 for capturing the Rx
samples. The simple source code is included at the bottom of this email
with the relevant part highlighted.
The example produces the error message below which indicates a circular
graph, I think. I can fix it by replacing the "connect_through_blocks()"
with "graph->connect()" and skipping property propagation on one connection.
I do not understand why this graph as-is causes a propagation error. Here
are some remarks:
1) The Replay port numbers are different. Given that the Replay controller
on branch 4.1 does not modify the default forwarding and that the default
forwarding is One-to-One, it seems that different port numbers should not
cause a circular propagation.
2) Additionally, given that the Radio block sets its forwarding to Drop, it
seems that there shouldn't be an issue even if the Replay block port
numbers were the same.
3) I see that on 'master', the Replay block was modified to change the
default forwarding to Drop. Perhaps this would fix the issue, but it
doesn't seem like it given that the Radio is already set to Drop.
Please let me know if you know why this graph causes an error.
Rob
// Console ERROR
[ERROR] [RFNOC::GRAPH::DETAIL] Adding edge 0/DDC#0:0 -> 0/Replay#0:1
without disabling property_propagation_active will lead to unresolvable
graph!
Error: RfnocError: Adding edge without disabling
property_propagation_active will lead to unresolvable graph!
// Example APPLICATION
#include <uhd/rfnoc/block_id.hpp>
#include <uhd/rfnoc/radio_control.hpp>
#include <uhd/rfnoc/replay_block_control.hpp>
#include <uhd/rfnoc_graph.hpp>
#include <uhd/utils/graph_utils.hpp>
#include <uhd/utils/safe_main.hpp>
#include <boost/program_options.hpp>
namespace po = boost::program_options;
using std::cout;
using std::endl;
int UHD_SAFE_MAIN(int argc, char* argv[])
{
std::string args;
po::options_description desc("Allowed Options");
// clang-format off
desc.add_options()
("help", "help message")
("args", po::value<std::string>(&args)->default_value(""), "multi uhd
device address args")
;
po::variables_map vm;
po::store(po::parse_command_line(argc, argv, desc), vm);
po::notify(vm);
// Print help message
if (vm.count("help"))
{
cout << "Replay graph test " << desc << endl;
return EXIT_FAILURE;
}
/************************************************************************
* Create device and block controls
***********************************************************************/
cout << endl;
cout << "Creating the RFNoC graph with args: " << args << endl << endl;
uhd::rfnoc::rfnoc_graph::sptr graph = uhd::rfnoc::rfnoc_graph::make(args);
// Create handle for radio object
uhd::rfnoc::block_id_t radio_ctrl_id(0, "Radio", 0);
auto radio_ctrl =
graph->get_block<uhd::rfnoc::radio_control>(radio_ctrl_id);
uhd::rfnoc::block_id_t replay_ctrl_id(0, "Replay", 0);
auto replay_ctrl =
graph->get_block<uhd::rfnoc::replay_block_control>(replay_ctrl_id);
// Connect the Replay Port 0 to Tx Radio Port 0
connect_through_blocks(graph, replay_ctrl_id, 0, radio_ctrl_id, 0);
// Connect the Rx Radio Port 0 to Replay Port 1
connect_through_blocks(graph, radio_ctrl_id, 0, replay_ctrl_id, 1);
graph->commit();
cout << "Active graph connections:" << endl;
for (auto& edge : graph->enumerate_active_connections())
cout << "* " << edge.to_string() << endl;
cout << endl;
return EXIT_SUCCESS;
}
_______________________________________________
USRP-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]