3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-05 02:40:25 +00:00

Added "top" attribute to mark top module in hierarchy

This commit is contained in:
Clifford Wolf 2013-11-24 05:03:43 +01:00
parent a4edecb0ca
commit 28093d9dd2
6 changed files with 63 additions and 3 deletions

View file

@ -172,6 +172,11 @@ struct SpiceBackend : public Backend {
}
extra_args(f, filename, args, argidx);
if (top_module_name.empty())
for (auto & mod_it:design->modules)
if (mod_it.second->get_bool_attribute("\\top"))
top_module_name = mod_it.first;
fprintf(f, "* SPICE netlist generated by %s\n", yosys_version_str);
fprintf(f, "\n");