From d63b335da5720cd15cf89e9d7347d9c397a2caee Mon Sep 17 00:00:00 2001 From: Zen Date: Wed, 30 Oct 2024 09:30:49 +0800 Subject: [PATCH 1/6] Add debugging support for DAG (#536) * Add debugging support for DAG * Revert "Add debugging support for DAG" This reverts commit 7ba728febb21188ee3ee789c704ebe72ccf3fb2e. * Add debugging support for DAG * Reset DAG after scheduler being reset --- sparta/sparta/kernel/DAG.hpp | 1 + sparta/src/DAG.cpp | 27 +++++++++++++++++---------- sparta/src/Scheduler.cpp | 2 +- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/sparta/sparta/kernel/DAG.hpp b/sparta/sparta/kernel/DAG.hpp index 58a10d60c1..c5d55953ec 100644 --- a/sparta/sparta/kernel/DAG.hpp +++ b/sparta/sparta/kernel/DAG.hpp @@ -221,6 +221,7 @@ namespace sparta VertexMap gops_; bool finalized_ = false; sparta::Scheduler* my_scheduler_ = nullptr; + const log::MessageSource debug_logger_; };//End class DAG diff --git a/sparta/src/DAG.cpp b/sparta/src/DAG.cpp index b8b48b41ac..c5b2f54a11 100644 --- a/sparta/src/DAG.cpp +++ b/sparta/src/DAG.cpp @@ -122,10 +122,17 @@ namespace sparta num_groups_(1), early_cycle_detect_(check_cycles), gops_(), - my_scheduler_(scheduler) + my_scheduler_(scheduler), + debug_logger_(scheduler, + sparta::log::categories::DEBUG, + "Scheduler's constructing DAG debug messages") { initializeDAG_(); - + // Enable early cycle detection when the debug logger is + // enabled for the convenience of debugging ... + if(debug_logger_.observed()){ + early_cycle_detect_ = true; + } } void DAG::initializeDAG_() @@ -171,20 +178,20 @@ namespace sparta dest_vertex->setInDAG(true); } - // TODO: REMOVE DEBUGGING STATEMENTS - //std::cout << "DAG::link()" << std::endl; - //std::cout << "\t" << std::string(*source_vertex) << " -> " << std::string(*dest_vertex) << std::endl; + if(SPARTA_EXPECT_FALSE(debug_logger_)){ + debug_logger_ << SPARTA_CURRENT_COLOR_GREEN + << "=== SCHEDULER: Add DAG link for " + << reason << ": " + << SPARTA_CURRENT_COLOR_NORMAL + << std::string(*source_vertex) << " -> " + << std::string(*dest_vertex); + } if (source_vertex->link(e_factory_, dest_vertex, reason)) { if (early_cycle_detect_ && detectCycle()) { throw CycleException(getCycles_()); } } - - // TODO: DEBUGGING - remove this - //if (detectCycle()) { - //throw CycleException(getCycles_()); - //} } diff --git a/sparta/src/Scheduler.cpp b/sparta/src/Scheduler.cpp index 887ffd7654..e1af41da5b 100644 --- a/sparta/src/Scheduler.cpp +++ b/sparta/src/Scheduler.cpp @@ -165,8 +165,8 @@ void Scheduler::reset() enterTeardown(); // On RootTreeNode clearEvents(); - dag_.reset(new DAG(this, false)); dag_finalized_ = false; + dag_.reset(new DAG(this, false)); tick_quantum_allocator_.clear(); } From d03a7fcb370ec5961f20c8fec18485ab00a4bba1 Mon Sep 17 00:00:00 2001 From: Zen Date: Wed, 30 Oct 2024 11:07:12 +0800 Subject: [PATCH 2/6] Add knob to turn off auto precedence for Events (#537) * Add knob to turn off auto precedence for Events * Comment tweaks --- sparta/sparta/events/EventNode.hpp | 29 +++++++++++++++++++++++++++++ sparta/sparta/simulation/Unit.hpp | 5 +++++ 2 files changed, 34 insertions(+) diff --git a/sparta/sparta/events/EventNode.hpp b/sparta/sparta/events/EventNode.hpp index 2d165072df..5991918d9e 100644 --- a/sparta/sparta/events/EventNode.hpp +++ b/sparta/sparta/events/EventNode.hpp @@ -97,6 +97,32 @@ namespace sparta //! Get the scheduleable associated with this event node virtual Scheduleable & getScheduleable() = 0; + /** + * \brief Turn on/off auto precedence for this EvendNode + * \param participate Set to true [default] if the EventNode is to + * participate in auto precedence establishment + * in sparta::Unit + * + * In sparta::Unit, registered sparta::Event types and Ports will + * have auto precedence established between them if the user + * of sparta::Unit allows it to do so. However, this might not + * be desired for some Events that are created by the modeler + * and internally bound before the sparta::Unit performs this + * setup. Calling this method with participate set to false, + * will prevent the assertion that the EventNode is be being + * registered after port binding. + */ + virtual void participateInAutoPrecedence(bool participate) { + participate_in_auto_precedence_ = participate; + } + + //! \brief Does this EventNode participate in auto-precedence + //! establishment by sparta::Unit? + //! \return true if so, false otherwise + virtual bool doesParticipateInAutoPrecedence() const { + return participate_in_auto_precedence_; + } + private: //! Make sure the parent is an EventNodeSet @@ -104,6 +130,9 @@ namespace sparta //! Scheduling phase of this node const sparta::SchedulingPhase sched_phase_; + + //! Does this EventNode participate in auto precedence? + bool participate_in_auto_precedence_ = true; }; } diff --git a/sparta/sparta/simulation/Unit.hpp b/sparta/sparta/simulation/Unit.hpp index e90a1e98e1..12196f765b 100644 --- a/sparta/sparta/simulation/Unit.hpp +++ b/sparta/sparta/simulation/Unit.hpp @@ -125,6 +125,11 @@ namespace sparta { for(auto & event_node : unit_event_set_.getEvents(sparta::SchedulingPhase::Tick)) { + // This event does not participate in auto precedence. + if(!event_node->doesParticipateInAutoPrecedence()) { + continue; + } + // Go through all of the registered InPorts and set these // ports to precede any events that are on the Tick phase. // This is for 0-cycle precedence only. From a9440664a7ffb83e0f2677d301f4121b72dd6cb0 Mon Sep 17 00:00:00 2001 From: Zen Date: Mon, 4 Nov 2024 09:52:49 +0800 Subject: [PATCH 3/6] Add CLS option to control infinite loop timeout (#538) --- sparta/src/CommandLineSimulator.cpp | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/sparta/src/CommandLineSimulator.cpp b/sparta/src/CommandLineSimulator.cpp index bb6dff13d9..ba3785ef15 100644 --- a/sparta/src/CommandLineSimulator.cpp +++ b/sparta/src/CommandLineSimulator.cpp @@ -320,7 +320,9 @@ CommandLineSimulator::CommandLineSimulator(const std::string& usage, "Examples:\n'--cpu-timeout 5 clean'\n" "'--cpu-timeout 5 error'\n" "The only exit types are \"clean\" and \"error\". error throws an exception, clean will stop simulation nicely.") // Brief - + ("inf-loop-timeout", + named_value>>("SECONDS"), + "The time length that the simulator uses to check whether the scheduler makes the forward progress.") // Brief ; debug_opts_.add_options() @@ -1402,14 +1404,32 @@ bool CommandLineSimulator::parse(int argc, bool use_wall_clock; if(o.string_key == "cpu-timeout") + { use_wall_clock = false; + } else if (o.string_key == "wall-timeout") + { use_wall_clock = true; - else + } + else{ sparta_assert(false); // one can only hope that we can't get here logically. + } std::cout << " set timeout to " << hours << " hours" << std::endl; SleeperThread::getInstance()->setTimeout(duration, clean_exit, use_wall_clock); ++i; + } else if(o.string_key == "inf-loop-timeout") { + size_t end_pos; + size_t seconds; + try { + seconds = utils::smartLexicalCast(o.value.at(0), end_pos); + } + catch(...){ + throw SpartaException("inf-loop-timeout must take an integer value, not \"") + << o.value.at(0) << "\""; + } + std::cout << " set infinite loop protection timeout to " << seconds << " seconds" << std::endl; + SleeperThread::getInstance()->setInfLoopSleepInterval(std::chrono::seconds(seconds)); + ++i; } else if(o.string_key == "simdb-dir") { const std::string & db_dir = o.value[0]; auto p = sfs::path(db_dir); From 6b015e3c74c43faa8ab3fa63a819b7618112973f Mon Sep 17 00:00:00 2001 From: colby-nyce Date: Mon, 11 Nov 2024 13:23:36 -0600 Subject: [PATCH 4/6] Changes to support Atlas registers (#539) --- sparta/CMakeLists.txt | 8 +++- sparta/sparta/functional/Register.hpp | 54 +++++++++++++++++++++++- sparta/sparta/functional/RegisterSet.hpp | 19 +++++---- 3 files changed, 71 insertions(+), 10 deletions(-) diff --git a/sparta/CMakeLists.txt b/sparta/CMakeLists.txt index c0845de6e4..f08cb88e6f 100644 --- a/sparta/CMakeLists.txt +++ b/sparta/CMakeLists.txt @@ -154,7 +154,13 @@ if (ENABLE_SANITIZERS) endif () set(CMAKE_CXX_FLAGS_PROFILE "-O3 -pg -g") -set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3") +if(DEFINED SPARTA_CXX_FLAGS_DEBUG AND SPARTA_CXX_FLAGS_DEBUG) + set(CMAKE_CXX_FLAGS_DEBUG "${SPARTA_CXX_FLAGS_DEBUG}") + message(STATUS "Using Sparta custom debug flags: ${CMAKE_CXX_FLAGS_DEBUG}") +else() + set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3") + message(STATUS "Using Sparta default debug flags: ${CMAKE_CXX_FLAGS_DEBUG}") +endif() # # If we're using CONDA, we might be using the one suggested for diff --git a/sparta/sparta/functional/Register.hpp b/sparta/sparta/functional/Register.hpp index a4816595b7..4190d3918d 100644 --- a/sparta/sparta/functional/Register.hpp +++ b/sparta/sparta/functional/Register.hpp @@ -1507,6 +1507,48 @@ class Register : public RegisterBase return ss.str(); } + /*! + * \brief Index of read/write access within register + */ + typedef RegisterBase::index_type index_type; + + /*! + * \brief Read value directly from the Register's backing store + * \note This is intentionally hiding the dmiRead() from the base + * class so we don't have to go through the dmiRead_() virtual method. + */ + template + inline T dmiRead(index_type idx = 0) const + { + T res; + dmiReadImpl_(&res, sizeof(res), sizeof(res) * idx); + return res; + } + + /*! + * \brief Write a value directly to this Register's backing store + * \note No masking, boundary checkor or notification is performed + * \note This is intentionally hiding the dmiWrite() from the base + * class so we don't have to go through the dmiWrite_() virtual method. + */ + template + inline void dmiWrite(T val, index_type idx = 0) + { + dmiWriteImpl_(&val, sizeof(val), sizeof(val) * idx); + } + + /*! + * \brief Write a value into this register without it being affected by the write-mask + * \warning This ignores read-only fields + * \note This is intentionally hiding the writeUnmasked() from the base + * class so we don't have to go through the dmiWriteImpl_() virtual method. + */ + template + inline void writeUnmasked(T val, index_type idx = 0) + { + dmiWriteImpl_(&val, sizeof(T), idx); + } + private: /*! * \brief Discover and store the raw location of this Register's data @@ -1536,7 +1578,7 @@ class Register : public RegisterBase void dmiRead_(void *buf, size_t size, size_t offset = 0) const override final { - memcpy(buf, raw_data_ptr_ + offset, size); + dmiReadImpl_(buf, size, offset); } void write_(const void *buf, size_t size, size_t offset=0) override final @@ -1559,6 +1601,16 @@ class Register : public RegisterBase } void dmiWrite_(const void *buf, size_t size, size_t offset = 0) override final + { + dmiWriteImpl_(buf, size, offset); + } + + inline void dmiReadImpl_(void *buf, size_t size, size_t offset = 0) const + { + memcpy(buf, raw_data_ptr_ + offset, size); + } + + inline void dmiWriteImpl_(const void *buf, size_t size, size_t offset = 0) { memcpy(raw_data_ptr_ + offset, buf, size); dview_.getLine()->flagDirty(); diff --git a/sparta/sparta/functional/RegisterSet.hpp b/sparta/sparta/functional/RegisterSet.hpp index 7e8044b8bf..818057f506 100644 --- a/sparta/sparta/functional/RegisterSet.hpp +++ b/sparta/sparta/functional/RegisterSet.hpp @@ -480,8 +480,9 @@ class RegisterSet : public TreeNode const RegisterBase::Definition *defs, const RegisterProxyBase::Definition *proxy_defs, CurrentBankFunction cbfxn, - RegisterTypeTag tag) - : TreeNode("regs", + RegisterTypeTag tag, + const std::string& name = "regs") + : TreeNode(name, TreeNode::GROUP_NAME_BUILTIN, TreeNode::GROUP_IDX_NONE, "Register set") @@ -530,8 +531,9 @@ class RegisterSet : public TreeNode template RegisterSet(TreeNode *parent, const RegisterBase::Definition *defs, - RegisterTypeTag tag) - : RegisterSet(parent, defs, nullptr, nullptr, tag) + RegisterTypeTag tag, + const std::string& name = "regs") + : RegisterSet(parent, defs, nullptr, nullptr, tag, name) { // Handled in delegated consturctor } @@ -541,18 +543,19 @@ class RegisterSet : public TreeNode create(TreeNode *parent, const RegisterBase::Definition *defs, const RegisterProxyBase::Definition *proxy_defs, - CurrentBankFunction cbfxn) + CurrentBankFunction cbfxn, + const std::string& name = "regs") { return std::unique_ptr(new RegisterSet( - parent, defs, proxy_defs, cbfxn, RegisterTypeTag())); + parent, defs, proxy_defs, cbfxn, RegisterTypeTag(), name)); } template static std::unique_ptr - create(TreeNode *parent, const RegisterBase::Definition *defs) + create(TreeNode *parent, const RegisterBase::Definition *defs, const std::string& name = "regs") { return std::unique_ptr(new RegisterSet( - parent, defs, RegisterTypeTag())); + parent, defs, RegisterTypeTag(), name)); } /*! From 9cb50cebda704a0c7a5a9818e2796d8d8c34e836 Mon Sep 17 00:00:00 2001 From: Colby Nyce Date: Fri, 8 Nov 2024 08:52:53 -0600 Subject: [PATCH 5/6] Fix arch-content and tree node extensions final config YAML bugs --- sparta/.gitignore | 3 +- sparta/sparta/parsers/ConfigEmitterYAML.hpp | 117 ++++++++++---------- sparta/src/CommandLineSimulator.cpp | 6 +- sparta/src/Report.cpp | 5 +- 4 files changed, 66 insertions(+), 65 deletions(-) diff --git a/sparta/.gitignore b/sparta/.gitignore index 9378c4b050..0f83e90cef 100644 --- a/sparta/.gitignore +++ b/sparta/.gitignore @@ -11,4 +11,5 @@ build* [Ff]ast[Dd]ebug* cmake-build-* *~ -compile_commands.json \ No newline at end of file +compile_commands.json +.vscode \ No newline at end of file diff --git a/sparta/sparta/parsers/ConfigEmitterYAML.hpp b/sparta/sparta/parsers/ConfigEmitterYAML.hpp index 80c5f6ef36..1b125ab36b 100644 --- a/sparta/sparta/parsers/ConfigEmitterYAML.hpp +++ b/sparta/sparta/parsers/ConfigEmitterYAML.hpp @@ -14,6 +14,7 @@ #include "sparta/simulation/Parameter.hpp" #include "sparta/app/SimulationInfo.hpp" #include "sparta/simulation/TreeNodePrivateAttorney.hpp" +#include "sparta/simulation/ParameterTree.hpp" namespace YP = YAML; // Prevent collision with YAML class in ConfigEmitter namespace. @@ -80,10 +81,12 @@ class YAML : public ConfigEmitter * \post emitter_ will be nullptr */ void addParameters(TreeNode* device_tree, + const ParameterTree* extensions_ptree, bool verbose=false) { sparta_assert(emitter_ == nullptr); sparta_assert(device_tree); + sparta_assert(extensions_ptree); if(verbose){ std::cout << "Writing parameters to \"" << filename_ << "\"" << std::endl; @@ -102,53 +105,25 @@ class YAML : public ConfigEmitter *emitter_ << YP::BeginDoc; sparta_assert(emitter_->good()); - handleNode_(device_tree, verbose); // Recurse - if (!tree_node_extensions_.empty()) { - for (auto & ext_info : tree_node_extensions_) { - TreeNode * tn = ext_info.first; - std::vector> & node_extensions = - ext_info.second; - - *emitter_ << YP::BeginMap; - *emitter_ << YP::Key << tn->getLocation(); - *emitter_ << YP::Value; - *emitter_ << YP::BeginMap; - - for (auto & node_extension : node_extensions) { - *emitter_ << YP::Key << ("extension." + node_extension.first); - *emitter_ << YP::Value; - *emitter_ << YP::BeginMap; - - TreeNode::ExtensionsBase * ext_base = node_extension.second; - ParameterSet * params = ext_base->getYamlOnlyParameters(); - auto param_names = params->getNames(); - for (const auto & param_name : param_names) { - *emitter_ << YP::Key << param_name; - *emitter_ << YP::Value // << YP::PadToColumn(50) - << params->getParameter(param_name)->getValueAsString(); - std::stringstream tags; - params->getParameter(param_name)->stringizeTags(tags); - *emitter_ << YP::Comment(tags.str()); - } - - params = ext_base->getParameters(); - param_names = params->getNames(); - for (const auto & param_name : param_names) { - *emitter_ << YP::Key << param_name; - *emitter_ << YP::Value // << YP::PadToColumn(50) - << params->getParameter(param_name)->getValueAsString(); - std::stringstream tags; - params->getParameter(param_name)->stringizeTags(tags); - *emitter_ << YP::Comment(tags.str()); - } - - *emitter_ << YP::EndMap; - } - *emitter_ << YP::EndMap; - *emitter_ << YP::EndMap; - } - } + handleNode_(device_tree, verbose); + + // Note we use the ParameterTree to get the tree node extensions instead + // of the device tree since using the device tree might serialize an extension + // defn of: + // + // top.cpu.core*.extension.core_extensions: + // name: value + // name: value + // + // As: + // + // top.cpu.core0.extension.core_extensions: + // name: value + // name: value + // + // But the ParameterTree retains the wildcards in the path. + handleNode_(extensions_ptree->getRoot()); *emitter_ << YP::EndDoc; sparta_assert(emitter_->good()); @@ -172,6 +147,41 @@ class YAML : public ConfigEmitter private: + /*! + * \brief Recursively write the TreeNode extensions defns to YAML + */ + void handleNode_(const ParameterTree::Node* subtree) + { + sparta_assert(subtree); + sparta_assert(emitter_ != nullptr); + + if (subtree->getName() == "extension") { + auto location_key = subtree->getParent()->getPath(); + *emitter_ << YP::BeginMap; + *emitter_ << YP::Key << location_key; + *emitter_ << YP::Value; + *emitter_ << YP::BeginMap; + + for (const auto child : subtree->getChildren()) { + auto extension_name = child->getName(); + *emitter_ << YP::Key << ("extension." + extension_name); + *emitter_ << YP::Value; + *emitter_ << YP::BeginMap; + for (const auto param : child->getChildren()) { + *emitter_ << YP::Key << param->getName(); + *emitter_ << YP::Value << param->getValue(); + } + *emitter_ << YP::EndMap; + } + + *emitter_ << YP::EndMap; + *emitter_ << YP::EndMap; + } else { + for (const auto child : subtree->getChildren()) { + handleNode_(child); + } + } + } /*! * \brief Render the content of this node as a sequence of YAML @@ -186,15 +196,6 @@ class YAML : public ConfigEmitter sparta_assert(subtree); sparta_assert(emitter_ != nullptr); - const auto & extension_names = subtree->getAllExtensionNames(); - for (const auto & ext_name : extension_names) { - auto extension = subtree->getExtension(ext_name); - if (extension) { - tree_node_extensions_[subtree].emplace_back( - std::make_pair(ext_name, subtree->getExtension(ext_name))); - } - } - // Print parameter value if this node is a parameter const ParameterBase* pb = dynamic_cast(subtree); if(pb){ @@ -396,12 +397,6 @@ class YAML : public ConfigEmitter */ const bool show_param_descs_; - /*! - * \brief Mapping from tree nodes to their named extensions, if any - */ - std::unordered_map>> tree_node_extensions_; - }; // class YAML } // namespace ConfigEmitter diff --git a/sparta/src/CommandLineSimulator.cpp b/sparta/src/CommandLineSimulator.cpp index ba3785ef15..f9eee50bb2 100644 --- a/sparta/src/CommandLineSimulator.cpp +++ b/sparta/src/CommandLineSimulator.cpp @@ -2110,13 +2110,15 @@ void CommandLineSimulator::populateSimulation_(Simulation* sim) if(final_config_file_ != ""){ sparta::ConfigEmitter::YAML param_out(final_config_file_, false); // Hide descriptions - param_out.addParameters(sim->getRoot()->getSearchScope(), sim_config_.verbose_cfg); + const auto& ptree = sim->getSimulationConfiguration()->getExtensionsUnboundParameterTree(); + param_out.addParameters(sim->getRoot()->getSearchScope(), &ptree, sim_config_.verbose_cfg); } if(final_config_file_verbose_ != ""){ sparta::ConfigEmitter::YAML param_out(final_config_file_verbose_, true); // Show descriptions - param_out.addParameters(sim->getRoot()->getSearchScope(), sim_config_.verbose_cfg); + const auto& ptree = sim->getSimulationConfiguration()->getExtensionsUnboundParameterTree(); + param_out.addParameters(sim->getRoot()->getSearchScope(), &ptree, sim_config_.verbose_cfg); } if(sim_config_.pipeline_collection_file_prefix != NoPipelineCollectionStr) diff --git a/sparta/src/Report.cpp b/sparta/src/Report.cpp index a9bd554667..a1e0dd39fe 100644 --- a/sparta/src/Report.cpp +++ b/sparta/src/Report.cpp @@ -457,13 +457,16 @@ class ReportFileParserYAML } } } - else{ + else if (!skip_content_leaves_){ Report* const r = report_map_.at(scope.uid); statistics::expression::Expression expr(assoc_key, node_context, r->getStatistics()); // Add the expresssion add_expression(expr); } + else { + return true; + } } else{ Report* const r = report_map_.at(scope.uid); From 05ba8532be5d90fcebf28e7a7a7aa799a7b4d29e Mon Sep 17 00:00:00 2001 From: Colby Nyce Date: Fri, 8 Nov 2024 09:05:35 -0600 Subject: [PATCH 6/6] Fix arch-content and tree node extensions final config YAML bugs --- sparta/sparta/parsers/ConfigEmitterYAML.hpp | 35 +++++++++++---------- sparta/test/TreeNode/TreeNode_test.cpp | 6 ++-- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/sparta/sparta/parsers/ConfigEmitterYAML.hpp b/sparta/sparta/parsers/ConfigEmitterYAML.hpp index 1b125ab36b..4734509064 100644 --- a/sparta/sparta/parsers/ConfigEmitterYAML.hpp +++ b/sparta/sparta/parsers/ConfigEmitterYAML.hpp @@ -86,7 +86,6 @@ class YAML : public ConfigEmitter { sparta_assert(emitter_ == nullptr); sparta_assert(device_tree); - sparta_assert(extensions_ptree); if(verbose){ std::cout << "Writing parameters to \"" << filename_ << "\"" << std::endl; @@ -108,22 +107,24 @@ class YAML : public ConfigEmitter handleNode_(device_tree, verbose); - // Note we use the ParameterTree to get the tree node extensions instead - // of the device tree since using the device tree might serialize an extension - // defn of: - // - // top.cpu.core*.extension.core_extensions: - // name: value - // name: value - // - // As: - // - // top.cpu.core0.extension.core_extensions: - // name: value - // name: value - // - // But the ParameterTree retains the wildcards in the path. - handleNode_(extensions_ptree->getRoot()); + if (extensions_ptree) { + // Note we use the ParameterTree to get the tree node extensions instead + // of the device tree since using the device tree might serialize an extension + // defn of: + // + // top.cpu.core*.extension.core_extensions: + // name: value + // name: value + // + // As: + // + // top.cpu.core0.extension.core_extensions: + // name: value + // name: value + // + // But the ParameterTree retains the wildcards in the path. + handleNode_(extensions_ptree->getRoot()); + } *emitter_ << YP::EndDoc; sparta_assert(emitter_->good()); diff --git a/sparta/test/TreeNode/TreeNode_test.cpp b/sparta/test/TreeNode/TreeNode_test.cpp index b7d791a076..4bcd26c32e 100644 --- a/sparta/test/TreeNode/TreeNode_test.cpp +++ b/sparta/test/TreeNode/TreeNode_test.cpp @@ -1103,7 +1103,7 @@ int main() sparta::ConfigEmitter::YAML param_out(filename_orig, true); // verbose - EXPECT_NOTHROW(param_out.addParameters(&top, true)); // verbose + EXPECT_NOTHROW(param_out.addParameters(&top, nullptr, true)); // verbose // Ensure taht the read count on this crazy parameter has not changed // when emitting the YAML @@ -1128,7 +1128,7 @@ int main() // Store Parameter Tree sparta::ConfigEmitter::YAML param_out(filename_new, false); // Terse - EXPECT_NOTHROW(param_out.addParameters(&top, false)); + EXPECT_NOTHROW(param_out.addParameters(&top, nullptr, false)); // Reset read counts to write them again recurs_reset(&top); @@ -1144,7 +1144,7 @@ int main() // Store Parameter Tree sparta::ConfigEmitter::YAML param_out(filename_new, true); // Verbose - EXPECT_NOTHROW(param_out.addParameters(&top, false)); + EXPECT_NOTHROW(param_out.addParameters(&top, nullptr, false)); // Reset read counts to write them again recurs_reset(&top);