#include <string>
#include <stdlib.h>
+#include <kernel/rtlil.h>
+#include <kernel/log.h>
+
struct CellTypes
{
std::set<std::string> cell_types;
if (type == "$_XOR_")
return const_xor(arg1, arg2, false, false, 1);
- assert(!"Called CellType.eval() with unsupported cell type!");
- abort();
+ log_abort();
}
static RTLIL::Const eval(RTLIL::Cell *cell, const RTLIL::Const &arg1, const RTLIL::Const &arg2)
const char *log_signal(const RTLIL::SigSpec &sig, bool autoint = true);
#define log_abort() log_error("Abort in %s:%d.\n", __FILE__, __LINE__)
+#define log_assert(_assert_expr_) do { if (_assert_expr_) break; log_error("Assert `%s' failed in %s:%d.\n", #_assert_expr_, __FILE__, __LINE__); } while (0)
#endif