if (design->modules.count(modname) == 0) {
new_ast->str = modname;
design->modules[modname] = process_module(new_ast);
+ design->modules[modname]->check();
} else {
log("Found cached RTLIL representation for module `%s'.\n", modname.c_str());
}
if (f == NULL)
log_error("Can't open script file `%s' for reading: %s\n", filename.c_str(), strerror(errno));
std::string command;
- while (fgetline(f, command)) {
+ while (fgetline(f, command))
Pass::call(design, command);
- design->check();
- }
- if (!command.empty()) {
+ if (!command.empty())
Pass::call(design, command);
- design->check();
- }
if (filename != "-")
fclose(f);
if (backend_command != NULL && *backend_command == "auto")
}
Frontend::frontend_call(design, NULL, filename, command);
- design->check();
}
static void run_pass(std::string command, RTLIL::Design *design)
log("\n-- Running pass `%s' --\n", command.c_str());
Pass::call(design, command);
- design->check();
}
static void run_backend(std::string filename, std::string command, RTLIL::Design *design)
}
Backend::backend_call(design, NULL, filename, command);
- design->check();
}
static char *readline_cmd_generator(const char *text, int state)
pass_register[args[0]]->execute(args, design);
while (design->selection_stack.size() > orig_sel_stack_pos)
design->selection_stack.pop_back();
+
+ design->check();
}
Frontend::Frontend(std::string name, std::string short_help) : Pass("read_"+name, short_help), frontend_name(name)
args.push_back(filename);
frontend_register[args[0]]->execute(args, design);
}
+
+ design->check();
}
Backend::Backend(std::string name, std::string short_help) : Pass("write_"+name, short_help), backend_name(name)
while (design->selection_stack.size() > orig_sel_stack_pos)
design->selection_stack.pop_back();
+
+ design->check();
}
struct HelpPass : public Pass {
for (auto &mod_it : design->modules)
if (techmap_module(design, mod_it.second, map, handled_cells, celltypeMap, false, opt_mode))
did_something = true;
+ if (did_something)
+ design->check();
}
log("No more expansions possible.\n");