projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b72a7e1
)
Add support for `resetall compiler directive
author
Clifford Wolf
<clifford@clifford.at>
Wed, 26 Apr 2017 14:09:32 +0000
(16:09 +0200)
committer
Clifford Wolf
<clifford@clifford.at>
Wed, 26 Apr 2017 14:09:41 +0000
(16:09 +0200)
frontends/verilog/preproc.cc
patch
|
blob
|
history
diff --git
a/frontends/verilog/preproc.cc
b/frontends/verilog/preproc.cc
index 41b5eac19f485e8bfe5d5c1eb5c0667b1c07f915..cf220fef908e2761d27799653c8d23c1b2eecc94 100644
(file)
--- a/
frontends/verilog/preproc.cc
+++ b/
frontends/verilog/preproc.cc
@@
-438,6
+438,13
@@
std::string frontend_verilog_preproc(std::istream &f, std::string filename, cons
continue;
}
+ if (tok == "`resetall") {
+ defines_map.clear();
+ defines_with_args.clear();
+ global_defines_cache.clear();
+ continue;
+ }
+
if (tok.size() > 1 && tok[0] == '`' && defines_map.count(tok.substr(1)) > 0) {
std::string name = tok.substr(1);
// printf("expand: >>%s<< -> >>%s<<\n", name.c_str(), defines_map[name].c_str());