diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-06-07 15:47:28 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-06-07 15:47:28 -0700 |
commit | 58f4b106f3b5914fa00edd59bb2df56d9fe2632e (patch) | |
tree | 2c8a34fc19815adfbf952e93c9726a0318bb5e23 /frontends/ast/genrtlil.cc | |
parent | f705f6a0b5d19d38cf41ba5f782847de54110463 (diff) | |
parent | 2b350401c4577d54c0d460240e2d2847d2eeadc4 (diff) | |
download | yosys-58f4b106f3b5914fa00edd59bb2df56d9fe2632e.tar.gz yosys-58f4b106f3b5914fa00edd59bb2df56d9fe2632e.tar.bz2 yosys-58f4b106f3b5914fa00edd59bb2df56d9fe2632e.zip |
Merge branch 'master' into eddie/muxpack
Diffstat (limited to 'frontends/ast/genrtlil.cc')
-rw-r--r-- | frontends/ast/genrtlil.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc index d2651c9aa..32ed401eb 100644 --- a/frontends/ast/genrtlil.cc +++ b/frontends/ast/genrtlil.cc @@ -1575,6 +1575,37 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint) delete always; } break; + case AST_TECALL: { + int sz = children.size(); + if (str == "$info") { + if (sz > 0) + log_file_info(filename, linenum, "%s.\n", children[0]->str.c_str()); + else + log_file_info(filename, linenum, "\n"); + } else if (str == "$warning") { + if (sz > 0) + log_file_warning(filename, linenum, "%s.\n", children[0]->str.c_str()); + else + log_file_warning(filename, linenum, "\n"); + } else if (str == "$error") { + if (sz > 0) + log_file_error(filename, linenum, "%s.\n", children[0]->str.c_str()); + else + log_file_error(filename, linenum, "\n"); + } else if (str == "$fatal") { + // TODO: 1st parameter, if exists, is 0,1 or 2, and passed to $finish() + // if no parameter is given, default value is 1 + // dollar_finish(sz ? children[0] : 1); + // perhaps create & use log_file_fatal() + if (sz > 0) + log_file_error(filename, linenum, "FATAL: %s.\n", children[0]->str.c_str()); + else + log_file_error(filename, linenum, "FATAL.\n"); + } else { + log_file_error(filename, linenum, "Unknown elabortoon system task '%s'.\n", str.c_str()); + } + } break; + case AST_FCALL: { if (str == "\\$anyconst" || str == "\\$anyseq" || str == "\\$allconst" || str == "\\$allseq") { |