878 log(
"Storing AST representation for module `%s'.\n", ast->
str.c_str());
880 log(
"Generating RTLIL representation for module `%s'.\n", ast->
str.c_str());
884 current_module->name = ast->
str;
891 log(
"Dumping verilog AST before simplification:\n");
893 log(
"--- END OF AST DUMP ---\n");
901 log(
"Dumping verilog AST after simplification:\n");
903 log(
"--- END OF AST DUMP ---\n");
907 log(
"Dumping verilog AST (as requested by dump_vlog option):\n");
909 log(
"--- END OF AST DUMP ---\n");
913 std::vector<AstNode*> new_children;
915 if (child->type ==
AST_WIRE && (child->is_input || child->is_output))
916 new_children.push_back(child);
921 ast->
attributes[
"\\blackbox"] = AstNode::mkconst_int(1,
false);
928 log_error(
"Attribute `%s' with non-constant value at %s:%d!\n",
930 current_module->attributes[attr.first] = attr.second->asAttrConst();
932 for (
size_t i = 0; i < ast->
children.size(); i++) {
937 for (
size_t i = 0; i < ast->
children.size(); i++) {
945 for (
size_t i = 0; i < ast->
children.size(); i++) {
954 current_module->ast = ast_before_simplify;
962 current_module->fixup_ports();
std::string stringf(const char *fmt,...)
void dumpAst(FILE *f, std::string indent)
RTLIL::SigSpec genRTLIL(int width_hint=-1, bool sign_hint=false)
std::map< RTLIL::IdString, AstNode * > attributes
void dumpVlog(FILE *f, std::string indent)
void log_error(const char *format,...)
RTLIL::SigSpec ignoreThisSignalsInInitial
#define log_assert(_assert_expr_)
bool simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage, int width_hint, bool sign_hint, bool in_param)
AstNode * current_ast_mod
void log(const char *format,...)
std::vector< AstNode * > children
AstModule * current_module