3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-06 14:13:23 +00:00

Implemented proper handling of stub placeholder modules

This commit is contained in:
Clifford Wolf 2013-03-28 09:20:10 +01:00
parent 98fcb5daa3
commit 7bfc7b61a8
7 changed files with 70 additions and 16 deletions

View file

@ -89,6 +89,9 @@ struct VerilogFrontend : public Frontend {
log(" -nopp\n");
log(" do not run the pre-processor\n");
log("\n");
log(" -lib\n");
log(" only create empty placeholder modules\n");
log("\n");
}
virtual void execute(FILE *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design)
{
@ -100,6 +103,7 @@ struct VerilogFrontend : public Frontend {
bool flag_mem2reg = false;
bool flag_ppdump = false;
bool flag_nopp = false;
bool flag_lib = false;
frontend_verilog_yydebug = false;
log_header("Executing Verilog-2005 frontend.\n");
@ -144,6 +148,10 @@ struct VerilogFrontend : public Frontend {
flag_nopp = true;
continue;
}
if (arg == "-lib") {
flag_lib = true;
continue;
}
break;
}
extra_args(f, filename, args, argidx);
@ -173,7 +181,7 @@ struct VerilogFrontend : public Frontend {
frontend_verilog_yyparse();
frontend_verilog_yylex_destroy();
AST::process(design, current_ast, flag_dump_ast, flag_dump_ast_diff, flag_dump_vlog, flag_nolatches, flag_nomem2reg, flag_mem2reg);
AST::process(design, current_ast, flag_dump_ast, flag_dump_ast_diff, flag_dump_vlog, flag_nolatches, flag_nomem2reg, flag_mem2reg, flag_lib);
if (!flag_nopp)
fclose(fp);