mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #1253 from YosysHQ/clifford/check
Be less aggressive with running design->check()
This commit is contained in:
commit
c5d56fbe2d
|
@ -522,6 +522,12 @@ int main(int argc, char **argv)
|
||||||
if (!backend_command.empty())
|
if (!backend_command.empty())
|
||||||
run_backend(output_filename, backend_command);
|
run_backend(output_filename, backend_command);
|
||||||
|
|
||||||
|
yosys_design->check();
|
||||||
|
for (auto it : saved_designs)
|
||||||
|
it.second->check();
|
||||||
|
for (auto it : pushed_designs)
|
||||||
|
it->check();
|
||||||
|
|
||||||
if (!depsfile.empty())
|
if (!depsfile.empty())
|
||||||
{
|
{
|
||||||
FILE *f = fopen(depsfile.c_str(), "wt");
|
FILE *f = fopen(depsfile.c_str(), "wt");
|
||||||
|
|
|
@ -295,8 +295,6 @@ void Pass::call(RTLIL::Design *design, std::vector<std::string> args)
|
||||||
pass_register[args[0]]->post_execute(state);
|
pass_register[args[0]]->post_execute(state);
|
||||||
while (design->selection_stack.size() > orig_sel_stack_pos)
|
while (design->selection_stack.size() > orig_sel_stack_pos)
|
||||||
design->selection_stack.pop_back();
|
design->selection_stack.pop_back();
|
||||||
|
|
||||||
design->check();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pass::call_on_selection(RTLIL::Design *design, const RTLIL::Selection &selection, std::string command)
|
void Pass::call_on_selection(RTLIL::Design *design, const RTLIL::Selection &selection, std::string command)
|
||||||
|
@ -378,8 +376,10 @@ void ScriptPass::run(std::string command, std::string info)
|
||||||
log(" %s\n", command.c_str());
|
log(" %s\n", command.c_str());
|
||||||
else
|
else
|
||||||
log(" %s %s\n", command.c_str(), info.c_str());
|
log(" %s %s\n", command.c_str(), info.c_str());
|
||||||
} else
|
} else {
|
||||||
Pass::call(active_design, command);
|
Pass::call(active_design, command);
|
||||||
|
active_design->check();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptPass::run_script(RTLIL::Design *design, std::string run_from, std::string run_to)
|
void ScriptPass::run_script(RTLIL::Design *design, std::string run_from, std::string run_to)
|
||||||
|
@ -573,8 +573,6 @@ void Frontend::frontend_call(RTLIL::Design *design, std::istream *f, std::string
|
||||||
args.push_back(filename);
|
args.push_back(filename);
|
||||||
frontend_register[args[0]]->execute(args, design);
|
frontend_register[args[0]]->execute(args, design);
|
||||||
}
|
}
|
||||||
|
|
||||||
design->check();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Backend::Backend(std::string name, std::string short_help) :
|
Backend::Backend(std::string name, std::string short_help) :
|
||||||
|
@ -698,8 +696,6 @@ void Backend::backend_call(RTLIL::Design *design, std::ostream *f, std::string f
|
||||||
|
|
||||||
while (design->selection_stack.size() > orig_sel_stack_pos)
|
while (design->selection_stack.size() > orig_sel_stack_pos)
|
||||||
design->selection_stack.pop_back();
|
design->selection_stack.pop_back();
|
||||||
|
|
||||||
design->check();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct CellHelpMessages {
|
static struct CellHelpMessages {
|
||||||
|
|
|
@ -964,14 +964,18 @@ void run_frontend(std::string filename, std::string command, std::string *backen
|
||||||
command += next_line;
|
command += next_line;
|
||||||
}
|
}
|
||||||
handle_label(command, from_to_active, run_from, run_to);
|
handle_label(command, from_to_active, run_from, run_to);
|
||||||
if (from_to_active)
|
if (from_to_active) {
|
||||||
Pass::call(design, command);
|
Pass::call(design, command);
|
||||||
|
design->check();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!command.empty()) {
|
if (!command.empty()) {
|
||||||
handle_label(command, from_to_active, run_from, run_to);
|
handle_label(command, from_to_active, run_from, run_to);
|
||||||
if (from_to_active)
|
if (from_to_active) {
|
||||||
Pass::call(design, command);
|
Pass::call(design, command);
|
||||||
|
design->check();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
|
@ -1000,6 +1004,7 @@ void run_frontend(std::string filename, std::string command, std::string *backen
|
||||||
Pass::call(design, vector<string>({command, filename}));
|
Pass::call(design, vector<string>({command, filename}));
|
||||||
else
|
else
|
||||||
Frontend::frontend_call(design, NULL, filename, command);
|
Frontend::frontend_call(design, NULL, filename, command);
|
||||||
|
design->check();
|
||||||
}
|
}
|
||||||
|
|
||||||
void run_frontend(std::string filename, std::string command, RTLIL::Design *design)
|
void run_frontend(std::string filename, std::string command, RTLIL::Design *design)
|
||||||
|
@ -1183,6 +1188,7 @@ void shell(RTLIL::Design *design)
|
||||||
design->selection_stack.pop_back();
|
design->selection_stack.pop_back();
|
||||||
log_reset_stack();
|
log_reset_stack();
|
||||||
}
|
}
|
||||||
|
design->check();
|
||||||
}
|
}
|
||||||
if (command == NULL)
|
if (command == NULL)
|
||||||
printf("exit\n");
|
printf("exit\n");
|
||||||
|
|
Loading…
Reference in New Issue