3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-25 01:55:33 +00:00

Add support for "yosys -E"

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-01-07 16:36:13 +01:00
parent 446ccf1f05
commit a96c775a73
13 changed files with 53 additions and 4 deletions

View file

@ -2638,6 +2638,7 @@ AstNode *AstNode::readmem(bool is_readmemh, std::string mem_filename, AstNode *m
std::ifstream f;
f.open(mem_filename.c_str());
yosys_input_files.insert(mem_filename);
if (f.fail())
log_error("Can not open file `%s` for %s at %s:%d.\n", mem_filename.c_str(), str.c_str(), filename.c_str(), linenum);

View file

@ -400,10 +400,12 @@ std::string frontend_verilog_preproc(std::istream &f, std::string filename, cons
if (!ff.fail()) break;
}
}
if (ff.fail())
if (ff.fail()) {
output_code.push_back("`file_notfound " + fn);
else
} else {
input_file(ff, fixed_fn);
yosys_input_files.insert(fixed_fn);
}
continue;
}