diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-06-06 14:06:59 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-06-06 14:06:59 -0700 |
commit | eaee250a6e63e58dfef63fa30c4120db78223e24 (patch) | |
tree | 972c0622281ee553a5afbd7544bcbba8a11ae45b /passes/sat/sim.cc | |
parent | 935df3569b4677ac38041ff01a2f67185681f4e3 (diff) | |
parent | 0a66720f6f67b087fe6342d01d45944506240942 (diff) | |
download | yosys-eaee250a6e63e58dfef63fa30c4120db78223e24.tar.gz yosys-eaee250a6e63e58dfef63fa30c4120db78223e24.tar.bz2 yosys-eaee250a6e63e58dfef63fa30c4120db78223e24.zip |
Merge remote-tracking branch 'origin/eddie/muxpack' into xc7mux
Diffstat (limited to 'passes/sat/sim.cc')
-rw-r--r-- | passes/sat/sim.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/passes/sat/sim.cc b/passes/sat/sim.cc index 53e248adf..4c3022c70 100644 --- a/passes/sat/sim.cc +++ b/passes/sat/sim.cc @@ -88,6 +88,8 @@ struct SimInstance SimInstance(SimShared *shared, Module *module, Cell *instance = nullptr, SimInstance *parent = nullptr) : shared(shared), module(module), instance(instance), parent(parent), sigmap(module) { + log_assert(module); + if (parent) { log_assert(parent->children.count(instance) == 0); parent->children[instance] = this; @@ -848,6 +850,9 @@ struct SimPass : public Pass { if (design->full_selection()) { top_mod = design->top_module(); + + if (!top_mod) + log_cmd_error("Design has no top module, use the 'hierarchy' command to specify one.\n"); } else { auto mods = design->selected_whole_modules(); if (GetSize(mods) != 1) |