From c94aa719d9c8533fdbfafdfed3df00885320f888 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 18 Jul 2024 16:56:52 +0200 Subject: [PATCH 1/2] VHDL is case insensitive, make sure netlist name is proper --- frontends/verific/verific.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontends/verific/verific.cc b/frontends/verific/verific.cc index 56e94489c..74a36a344 100644 --- a/frontends/verific/verific.cc +++ b/frontends/verific/verific.cc @@ -58,6 +58,7 @@ USING_YOSYS_NAMESPACE #ifdef VERIFIC_VHDL_SUPPORT #include "vhdl_file.h" +#include "VhdlIdDef.h" #include "VhdlUnits.h" #include "NameSpace.h" #endif @@ -2817,6 +2818,10 @@ std::set import_tops(const char* work, std::mapId()->OrigName()) != 0) { + top_mod_names.erase(name); + top_mod_names.insert(vhdl_unit->Id()->OrigName()); + } continue; } #endif From 405897a9719cb2409233fc8a310282c0dbe2ae8b Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 29 Jul 2024 15:50:38 +0200 Subject: [PATCH 2/2] Update top value that is returned back to hierarchy pass --- frontends/verific/verific.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontends/verific/verific.cc b/frontends/verific/verific.cc index 74a36a344..5a0e6113f 100644 --- a/frontends/verific/verific.cc +++ b/frontends/verific/verific.cc @@ -2760,7 +2760,7 @@ void import_all(const char* work, std::map *nl_todo, Map * #endif } -std::set import_tops(const char* work, std::map *nl_todo, Map *parameters, bool show_message, std::string ppfile YS_MAYBE_UNUSED, std::vector &tops) +std::set import_tops(const char* work, std::map *nl_todo, Map *parameters, bool show_message, std::string ppfile YS_MAYBE_UNUSED, std::vector &tops, std::string *top = nullptr) { std::set top_mod_names; Array *netlists = nullptr; @@ -2821,6 +2821,8 @@ std::set import_tops(const char* work, std::mapId()->OrigName()) != 0) { top_mod_names.erase(name); top_mod_names.insert(vhdl_unit->Id()->OrigName()); + if (top && *top == name) + *top = vhdl_unit->Id()->OrigName(); } continue; } @@ -2962,7 +2964,7 @@ std::string verific_import(Design *design, const std::map