From 4b23b6102c182e4f5a8612e16752d34465bf190c Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 6 Jun 2019 18:47:05 -0700 Subject: rfnoc: noc_block_base: Store property tree reference from make_args --- host/lib/rfnoc/noc_block_base.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'host/lib/rfnoc') diff --git a/host/lib/rfnoc/noc_block_base.cpp b/host/lib/rfnoc/noc_block_base.cpp index f99d5aae7..6e72decfe 100644 --- a/host/lib/rfnoc/noc_block_base.cpp +++ b/host/lib/rfnoc/noc_block_base.cpp @@ -26,6 +26,7 @@ noc_block_base::noc_block_base(make_args_ptr make_args) , _clock_iface(make_args->clk_iface) , _mb_controller(std::move(make_args->mb_control)) , _block_args(make_args->args) + , _tree(make_args->tree) { // First, create one tick_rate property for every port _tick_rate_props.reserve(get_num_input_ports() + get_num_output_ports()); @@ -62,7 +63,9 @@ noc_block_base::noc_block_base(make_args_ptr make_args) noc_block_base::~noc_block_base() { - // nop + for (const auto& node : _tree->list("")) { + _tree->remove(node); + } } void noc_block_base::set_num_input_ports(const size_t num_ports) -- cgit v1.2.3