mirror of
https://github.com/YosysHQ/yosys
synced 2026-06-03 07:37:57 +00:00
satgen: move report_missing_model here from equiv.h
This commit is contained in:
parent
81ea922512
commit
77f64de997
4 changed files with 22 additions and 16 deletions
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include "kernel/satgen.h"
|
#include "kernel/satgen.h"
|
||||||
#include "kernel/ff.h"
|
#include "kernel/ff.h"
|
||||||
|
#include "kernel/yosys_common.h"
|
||||||
|
|
||||||
USING_YOSYS_NAMESPACE
|
USING_YOSYS_NAMESPACE
|
||||||
|
|
||||||
|
|
@ -1387,3 +1388,22 @@ bool SatGen::importCell(RTLIL::Cell *cell, int timestep)
|
||||||
// .. and all sequential cells with asynchronous inputs
|
// .. and all sequential cells with asynchronous inputs
|
||||||
return false;
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -292,6 +292,8 @@ struct SatGen
|
||||||
bool importCell(RTLIL::Cell *cell, int timestep = -1);
|
bool importCell(RTLIL::Cell *cell, int timestep = -1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void report_missing_model(bool warn_only, RTLIL::Cell* cell);
|
||||||
|
|
||||||
YOSYS_NAMESPACE_END
|
YOSYS_NAMESPACE_END
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -8,21 +8,6 @@
|
||||||
|
|
||||||
YOSYS_NAMESPACE_BEGIN
|
YOSYS_NAMESPACE_BEGIN
|
||||||
|
|
||||||
static 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct EquivBasicConfig {
|
struct EquivBasicConfig {
|
||||||
bool model_undef = false;
|
bool model_undef = false;
|
||||||
int max_seq = 1;
|
int max_seq = 1;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
#include "kernel/satgen.h"
|
#include "kernel/satgen.h"
|
||||||
#include "kernel/yosys.h"
|
#include "kernel/yosys.h"
|
||||||
#include "kernel/log_help.h"
|
#include "kernel/log_help.h"
|
||||||
#include "passes/equiv/equiv.h"
|
|
||||||
|
|
||||||
USING_YOSYS_NAMESPACE
|
USING_YOSYS_NAMESPACE
|
||||||
PRIVATE_NAMESPACE_BEGIN
|
PRIVATE_NAMESPACE_BEGIN
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue