diff options
Diffstat (limited to 'backends/spice/spice.cc')
-rw-r--r-- | backends/spice/spice.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/backends/spice/spice.cc b/backends/spice/spice.cc index 6c8a3ec98..e7926e90e 100644 --- a/backends/spice/spice.cc +++ b/backends/spice/spice.cc @@ -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"); |