From a449e6ab3846a55127d8d39b1a544925c23fbe7d Mon Sep 17 00:00:00 2001 From: Stan Lee Date: Mon, 2 Mar 2026 12:19:09 -0800 Subject: [PATCH] always dump available scopes --- kernel/fstdata.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/kernel/fstdata.cc b/kernel/fstdata.cc index d34138e28..6d098dd0f 100644 --- a/kernel/fstdata.cc +++ b/kernel/fstdata.cc @@ -287,6 +287,15 @@ std::string FstData::autoScope(Module *topmod) { log("Auto-discovering scope from file...\n"); std::string top = RTLIL::unescape_id(topmod->name); + log("Available scopes:\n"); + std::set unique_scopes; + for (const auto& var : vars) { + unique_scopes.insert(var.scope); + } + for (const auto& scope : unique_scopes) { + log(" %s\n", scope.c_str()); + } + // Option 1 - Instance based scope matching // Will fail if the DUT instance name != the top module name log("Trying instance-based scope matching...\n"); @@ -353,10 +362,5 @@ std::string FstData::autoScope(Module *topmod) { // No match found log_warning("Could not auto-discover scope for module '%s'...\n", RTLIL::unescape_id(topmod->name).c_str()); - log("Available scopes:\n"); - for (const auto& entry : scopes2matches) { - std::string scope = entry.first; - log(" %s\n", scope.c_str()); - } return ""; }