diff options
author | Andrew Zonenberg <azonenberg@drawersteak.com> | 2015-09-17 20:34:56 -0700 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-09-18 09:30:25 +0200 |
commit | e446e651cbd3373f1dc1fc79684c403707359d14 (patch) | |
tree | f04286a11d12a62d373f3718b584788b2ee83366 /frontends | |
parent | d9cecabb877b1d58efc1bfcd962201eace67640d (diff) | |
download | yosys-e446e651cbd3373f1dc1fc79684c403707359d14.tar.gz yosys-e446e651cbd3373f1dc1fc79684c403707359d14.tar.bz2 yosys-e446e651cbd3373f1dc1fc79684c403707359d14.zip |
Initial implementation of $finish()
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/ast/simplify.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index e588df922..76c9d5c51 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -174,7 +174,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage, } // deactivate all calls to non-synthesis system tasks - if ((type == AST_FCALL || type == AST_TCALL) && (str == "$display" || str == "$strobe" || str == "$monitor" || str == "$time" || str == "$stop" || str == "$finish" || + if ((type == AST_FCALL || type == AST_TCALL) && (str == "$display" || str == "$strobe" || str == "$monitor" || str == "$time" || str == "$stop" || str == "$dumpfile" || str == "$dumpvars" || str == "$dumpon" || str == "$dumpoff" || str == "$dumpall")) { log_warning("Ignoring call to system %s %s at %s:%d.\n", type == AST_FCALL ? "function" : "task", str.c_str(), filename.c_str(), linenum); delete_children(); @@ -1569,7 +1569,13 @@ skip_dynamic_range_lvalue_expansion:; if (current_scope.count(str) == 0 || current_scope[str]->type != AST_FUNCTION) log_error("Can't resolve function name `%s' at %s:%d.\n", str.c_str(), filename.c_str(), linenum); } - if (type == AST_TCALL) { + if (type == AST_TCALL) + { + if (str == "$finish") + { + log_error("System task `$finish() executed in `%s' at %s:%d.\n", str.c_str(), filename.c_str(), linenum); + } + if (str == "\\$readmemh" || str == "\\$readmemb") { if (GetSize(children) < 2 || GetSize(children) > 4) |