mirror of
https://github.com/YosysHQ/yosys
synced 2026-02-27 10:35:40 +00:00
Merge pull request #5666 from YosysHQ/emil/equiv_induct-missing-model-errors
equiv_induct: error on missing model
This commit is contained in:
commit
5f8489d36d
9 changed files with 165 additions and 136 deletions
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "kernel/satgen.h"
|
||||
#include "kernel/ff.h"
|
||||
#include "kernel/yosys_common.h"
|
||||
|
||||
USING_YOSYS_NAMESPACE
|
||||
|
||||
|
|
@ -1378,7 +1379,7 @@ bool SatGen::importCell(RTLIL::Cell *cell, int timestep)
|
|||
return true;
|
||||
}
|
||||
|
||||
if (cell->type == ID($scopeinfo))
|
||||
if (cell->type == ID($scopeinfo) || cell->type == ID($input_port))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1387,3 +1388,22 @@ bool SatGen::importCell(RTLIL::Cell *cell, int timestep)
|
|||
// .. and all sequential cells with asynchronous inputs
|
||||
return false;
|
||||
}
|
||||
|
||||
namespace Yosys {
|
||||
|
||||
void report_missing_model(bool warn_only, RTLIL::Cell* cell)
|
||||
{
|
||||
std::string s;
|
||||
if (cell->is_builtin_ff())
|
||||
s = stringf("No SAT model available for async FF cell %s (%s). Consider running `async2sync` or `clk2fflogic` first.\n", log_id(cell), log_id(cell->type));
|
||||
else
|
||||
s = stringf("No SAT model available for cell %s (%s).\n", log_id(cell), log_id(cell->type));
|
||||
|
||||
if (warn_only) {
|
||||
log_formatted_warning_noprefix(s);
|
||||
} else {
|
||||
log_formatted_error(s);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -293,6 +293,8 @@ struct SatGen
|
|||
bool importCell(RTLIL::Cell *cell, int timestep = -1);
|
||||
};
|
||||
|
||||
void report_missing_model(bool warn_only, RTLIL::Cell* cell);
|
||||
|
||||
YOSYS_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue