diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2019-09-28 09:50:29 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2019-09-28 09:51:48 +0200 |
commit | 0c380f085576c2cead5e3576825cb60046bfd76b (patch) | |
tree | e0bfd70ed33e26bb58227e3f9450774b89038885 /backends/protobuf | |
parent | d0493925ec739aa13cd72e5aa525e98ca49cc326 (diff) | |
download | yosys-0c380f085576c2cead5e3576825cb60046bfd76b.tar.gz yosys-0c380f085576c2cead5e3576825cb60046bfd76b.tar.bz2 yosys-0c380f085576c2cead5e3576825cb60046bfd76b.zip |
Add aiger and protobuf backends binary support
Diffstat (limited to 'backends/protobuf')
-rw-r--r-- | backends/protobuf/protobuf.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/protobuf/protobuf.cc b/backends/protobuf/protobuf.cc index fff110bb0..671686173 100644 --- a/backends/protobuf/protobuf.cc +++ b/backends/protobuf/protobuf.cc @@ -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)); |