mirror of https://github.com/YosysHQ/yosys.git
Add support for `resetall compiler directive
This commit is contained in:
parent
b72a7e1104
commit
f0db8ffdbc
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue