3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-25 18:15:34 +00:00

Added mem2reg option to verilog frontend

This commit is contained in:
Clifford Wolf 2013-03-24 11:13:32 +01:00
parent 6960df7285
commit df9753d398
5 changed files with 31 additions and 11 deletions

View file

@ -78,6 +78,11 @@ struct VerilogFrontend : public Frontend {
log(" this can also be achieved by setting the 'nomem2reg'\n");
log(" attribute on the respective module or register.\n");
log("\n");
log(" -mem2reg\n");
log(" always convert memories to registers. this can also be\n");
log(" achieved by setting the 'mem2reg' attribute on the respective\n");
log(" module or register.\n");
log("\n");
log(" -ppdump\n");
log(" dump verilog code after pre-processor\n");
log("\n");
@ -92,6 +97,7 @@ struct VerilogFrontend : public Frontend {
bool flag_dump_vlog = false;
bool flag_nolatches = false;
bool flag_nomem2reg = false;
bool flag_mem2reg = false;
bool flag_ppdump = false;
bool flag_nopp = false;
frontend_verilog_yydebug = false;
@ -126,6 +132,10 @@ struct VerilogFrontend : public Frontend {
flag_nomem2reg = true;
continue;
}
if (arg == "-mem2reg") {
flag_mem2reg = true;
continue;
}
if (arg == "-ppdump") {
flag_ppdump = true;
continue;
@ -163,7 +173,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);
AST::process(design, current_ast, flag_dump_ast, flag_dump_ast_diff, flag_dump_vlog, flag_nolatches, flag_nomem2reg, flag_mem2reg);
if (!flag_nopp)
fclose(fp);