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

Merge pull request #1413 from YosysHQ/mmicko/backend_binary_out

Support binary files for backends, fixes #1407
This commit is contained in:
Miodrag Milanović 2019-09-29 10:37:34 +02:00 committed by GitHub
commit ce0631c371
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View file

@ -777,7 +777,7 @@ struct AigerBackend : public Backend {
}
break;
}
extra_args(f, filename, args, argidx);
extra_args(f, filename, args, argidx, !ascii_mode);
Module *top_module = design->top_module();

View file

@ -856,7 +856,7 @@ struct XAigerBackend : public Backend {
}
break;
}
extra_args(f, filename, args, argidx);
extra_args(f, filename, args, argidx, !ascii_mode);
Module *top_module = design->top_module();

View file

@ -266,7 +266,7 @@ struct ProtobufBackend : public Backend {
}
break;
}
extra_args(f, filename, args, argidx);
extra_args(f, filename, args, argidx, !text_mode);
log_header(design, "Executing Protobuf backend.\n");
@ -338,7 +338,7 @@ struct ProtobufPass : public Pass {
if (!filename.empty()) {
rewrite_filename(filename);
std::ofstream *ff = new std::ofstream;
ff->open(filename.c_str(), std::ofstream::trunc);
ff->open(filename.c_str(), text_mode ? std::ofstream::trunc : (std::ofstream::trunc | std::ofstream::binary));
if (ff->fail()) {
delete ff;
log_error("Can't open file `%s' for writing: %s\n", filename.c_str(), strerror(errno));