Skip to content

Commit

Permalink
pass no_split_complex_ports to hierarchy command
Browse files Browse the repository at this point in the history
  • Loading branch information
Alain Dargelas committed Oct 29, 2024
1 parent cad46d9 commit 615f523
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
7 changes: 4 additions & 3 deletions frontends/verific/verific.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2938,7 +2938,7 @@ void verific_cleanup()
verific_import_pending = false;
}

std::string verific_import(Design *design, const std::map<std::string,std::string> &parameters, std::string top, bool opt)
std::string verific_import(Design *design, const std::map<std::string,std::string> &parameters, std::string top, bool opt, bool no_split_complex_port)
{
verific_sva_fsm_limit = 16;

Expand All @@ -2964,8 +2964,9 @@ std::string verific_import(Design *design, const std::map<std::string,std::strin
if (!verific_error_msg.empty())
log_error("%s\n", verific_error_msg.c_str());

for (auto nl : nl_todo)
nl.second->ChangePortBusStructures(1 /* hierarchical */);
if (!no_split_complex_port)
for (auto nl : nl_todo)
nl.second->ChangePortBusStructures(1 /* hierarchical */);

VerificExtNets worker;
for (auto nl : nl_todo)
Expand Down
2 changes: 1 addition & 1 deletion frontends/verific/verific.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ YOSYS_NAMESPACE_BEGIN
extern int verific_verbose;

extern bool verific_import_pending;
extern std::string verific_import(Design *design, const std::map<std::string,std::string> &parameters, std::string top = std::string(), bool opt = true);
extern std::string verific_import(Design *design, const std::map<std::string,std::string> &parameters, std::string top = std::string(), bool opt = true, bool no_split_complex_ports = true);

extern pool<int> verific_sva_prims;

Expand Down
9 changes: 7 additions & 2 deletions passes/hierarchy/hierarchy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ struct HierarchyPass : public Pass {
log_header(design, "Executing HIERARCHY pass (managing design hierarchy).\n");

bool flag_opt = false;
bool flag_no_split_complex_ports = false;
bool flag_check = false;
bool flag_simcheck = false;
bool flag_smtcheck = false;
Expand Down Expand Up @@ -940,6 +941,10 @@ struct HierarchyPass : public Pass {
flag_opt = true;
continue;
}
if (args[argidx] == "-no_split_complex_ports") {
flag_no_split_complex_ports = true;
continue;
}
if (args[argidx] == "-chparam" && argidx+2 < args.size()) {
const std::string &key = args[++argidx];
const std::string &value = args[++argidx];
Expand Down Expand Up @@ -989,7 +994,7 @@ struct HierarchyPass : public Pass {
if (top_mod == nullptr && !load_top_mod.empty()) {
#ifdef YOSYS_ENABLE_VERIFIC
if (verific_import_pending) {
load_top_mod = verific_import(design, parameters, load_top_mod, flag_opt);
load_top_mod = verific_import(design, parameters, load_top_mod, flag_opt, flag_no_split_complex_ports);
top_mod = design->module(RTLIL::escape_id(load_top_mod));
}
#endif
Expand All @@ -998,7 +1003,7 @@ struct HierarchyPass : public Pass {
} else {
#ifdef YOSYS_ENABLE_VERIFIC
if (verific_import_pending)
verific_import(design, parameters, std::string(), flag_opt);
verific_import(design, parameters, std::string(), flag_opt, flag_no_split_complex_ports);
#endif
}

Expand Down

0 comments on commit 615f523

Please sign in to comment.