188 log (
"\nSetting up time step %d:\n", timestep);
190 log (
"\nSetting up SAT problem:\n");
202 log_cmd_error(
"Failed to parse lhs set expression `%s'.\n", s.first.c_str());
204 log_cmd_error(
"Failed to parse rhs set expression `%s'.\n", s.second.c_str());
209 log_cmd_error(
"Set expression with different lhs and rhs sizes: %s (%s, %d bits) vs. %s (%s, %d bits)\n",
213 big_lhs.
remove2(lhs, &big_rhs);
218 for (
auto &s :
sets_at[timestep])
223 log_cmd_error(
"Failed to parse lhs set expression `%s'.\n", s.first.c_str());
225 log_cmd_error(
"Failed to parse rhs set expression `%s'.\n", s.second.c_str());
230 log_cmd_error(
"Set expression with different lhs and rhs sizes: %s (%s, %d bits) vs. %s (%s, %d bits)\n",
234 big_lhs.
remove2(lhs, &big_rhs);
244 log_cmd_error(
"Failed to parse lhs set expression `%s'.\n", s.c_str());
247 log(
"Import unset-constraint for this timestep: %s\n",
log_signal(lhs));
248 big_lhs.
remove2(lhs, &big_rhs);
258 std::set<RTLIL::SigSpec> sets_def_undef[3];
263 log_cmd_error(
"Failed to parse set-def expression `%s'.\n", s.c_str());
264 sets_def_undef[0].insert(sig);
270 log_cmd_error(
"Failed to parse set-def expression `%s'.\n", s.c_str());
271 sets_def_undef[1].insert(sig);
277 log_cmd_error(
"Failed to parse set-def expression `%s'.\n", s.c_str());
278 sets_def_undef[2].insert(sig);
284 log_cmd_error(
"Failed to parse set-def expression `%s'.\n", s.c_str());
285 sets_def_undef[0].insert(sig);
286 sets_def_undef[1].erase(sig);
287 sets_def_undef[2].erase(sig);
293 log_cmd_error(
"Failed to parse set-def expression `%s'.\n", s.c_str());
294 sets_def_undef[0].erase(sig);
295 sets_def_undef[1].insert(sig);
296 sets_def_undef[2].erase(sig);
302 log_cmd_error(
"Failed to parse set-def expression `%s'.\n", s.c_str());
303 sets_def_undef[0].erase(sig);
304 sets_def_undef[1].erase(sig);
305 sets_def_undef[2].insert(sig);
308 for (
int t = 0; t < 3; t++)
309 for (
auto &sig : sets_def_undef[t]) {
310 log(
"Import %s constraint for this timestep: %s\n", t == 0 ?
"def" : t == 1 ?
"any_undef" :
"all_undef",
log_signal(sig));
320 int import_cell_counter = 0;
325 for (
auto &p : c.second->connections())
328 import_cell_counter++;
334 log(
"Imported %d cells to SAT database.\n", import_cell_counter);
bool selected(T1 *module) const
void log_warning(const char *format,...)
static bool parse_sel(RTLIL::SigSpec &sig, RTLIL::Design *design, RTLIL::Module *module, std::string str)
const char * log_signal(const RTLIL::SigSpec &sig, bool autoint)
std::vector< std::string > sets_all_undef
void log_error(const char *format,...)
bool ignore_unknown_cells
std::map< int, std::vector< std::pair< std::string, std::string > > > sets_at
SigSet< RTLIL::Cell * > show_drivers
std::vector< int > importUndefSigSpec(RTLIL::SigSpec sig, int timestep=-1)
std::vector< std::string > sets_any_undef
bool cell_output(RTLIL::IdString type, RTLIL::IdString port)
std::map< int, std::vector< std::string > > sets_any_undef_at
void remove2(const RTLIL::SigSpec &pattern, RTLIL::SigSpec *other)
static const char * id2cstr(const RTLIL::IdString &str)
std::vector< std::pair< std::string, std::string > > sets
void log_cmd_error(const char *format,...)
void add(RTLIL::SigSpec sig)
std::map< RTLIL::IdString, RTLIL::Cell * > cells_
void log(const char *format,...)
bool importCell(RTLIL::Cell *cell, int timestep=-1)
std::map< int, std::vector< std::string > > sets_def_at
void append(const RTLIL::SigSpec &signal)
static bool parse_rhs(const RTLIL::SigSpec &lhs, RTLIL::SigSpec &sig, RTLIL::Module *module, std::string str)
std::map< int, std::vector< std::string > > unsets_at
void insert(RTLIL::SigSpec sig, T data)
std::vector< std::string > sets_def
int signals_eq(RTLIL::SigSpec lhs, RTLIL::SigSpec rhs, int timestep_lhs=-1, int timestep_rhs=-1)
std::map< int, std::vector< std::string > > sets_all_undef_at
void check_undef_enabled(const RTLIL::SigSpec &sig)