mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-25 10:05:33 +00:00
Implemented read_verilog -defer
This commit is contained in:
parent
b463907890
commit
cd9e8741a7
4 changed files with 111 additions and 68 deletions
|
@ -106,6 +106,11 @@ struct VerilogFrontend : public Frontend {
|
|||
log(" ignore re-definitions of modules. (the default behavior is to\n");
|
||||
log(" create an error message.)\n");
|
||||
log("\n");
|
||||
log(" -defer\n");
|
||||
log(" only read the abstract syntax tree and defer actual compilation\n");
|
||||
log(" to a later 'hierarchy' command. Useful in cases where the default\n");
|
||||
log(" parameters of modules yield invalid or not synthesizable code.\n");
|
||||
log("\n");
|
||||
log(" -setattr <attribute_name>\n");
|
||||
log(" set the specified attribute (to the value 1) on all loaded modules\n");
|
||||
log("\n");
|
||||
|
@ -135,6 +140,7 @@ struct VerilogFrontend : public Frontend {
|
|||
bool flag_noopt = false;
|
||||
bool flag_icells = false;
|
||||
bool flag_ignore_redef = false;
|
||||
bool flag_defer = false;
|
||||
std::map<std::string, std::string> defines_map;
|
||||
std::list<std::string> include_dirs;
|
||||
std::list<std::string> attributes;
|
||||
|
@ -199,6 +205,10 @@ struct VerilogFrontend : public Frontend {
|
|||
flag_ignore_redef = true;
|
||||
continue;
|
||||
}
|
||||
if (arg == "-defer") {
|
||||
flag_defer = true;
|
||||
continue;
|
||||
}
|
||||
if (arg == "-setattr" && argidx+1 < args.size()) {
|
||||
attributes.push_back(RTLIL::escape_id(args[++argidx]));
|
||||
continue;
|
||||
|
@ -264,7 +274,7 @@ struct VerilogFrontend : public Frontend {
|
|||
child->attributes[attr] = AST::AstNode::mkconst_int(1, false);
|
||||
}
|
||||
|
||||
AST::process(design, current_ast, flag_dump_ast1, flag_dump_ast2, flag_dump_vlog, flag_nolatches, flag_nomem2reg, flag_mem2reg, flag_lib, flag_noopt, flag_icells, flag_ignore_redef);
|
||||
AST::process(design, current_ast, flag_dump_ast1, flag_dump_ast2, flag_dump_vlog, flag_nolatches, flag_nomem2reg, flag_mem2reg, flag_lib, flag_noopt, flag_icells, flag_ignore_redef, flag_defer);
|
||||
|
||||
if (!flag_nopp)
|
||||
fclose(fp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue