3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-04 10:20:24 +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

@ -681,6 +681,7 @@ struct ShowPass : public Pass {
bool flag_enum = false;
bool flag_abbreviate = true;
bool flag_notitle = false;
bool custom_prefix = false;
RTLIL::IdString colorattr;
size_t argidx;
@ -697,6 +698,7 @@ struct ShowPass : public Pass {
}
if (arg == "-prefix" && argidx+1 < args.size()) {
prefix = args[++argidx];
custom_prefix = true;
continue;
}
if (arg == "-color" && argidx+2 < args.size()) {
@ -782,6 +784,7 @@ struct ShowPass : public Pass {
for (auto filename : libfiles) {
std::ifstream f;
f.open(filename.c_str());
yosys_input_files.insert(filename);
if (f.fail())
log_error("Can't open lib file `%s'.\n", filename.c_str());
RTLIL::Design *lib = new RTLIL::Design;
@ -797,6 +800,8 @@ struct ShowPass : public Pass {
log("Writing dot description to `%s'.\n", dot_file.c_str());
FILE *f = fopen(dot_file.c_str(), "w");
if (custom_prefix)
yosys_output_files.insert(dot_file);
if (f == NULL) {
for (auto lib : libs)
delete lib;