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 | |
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')
-rw-r--r-- | backends/aiger/aiger.cc | 2 | ||||
-rw-r--r-- | backends/protobuf/protobuf.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/backends/aiger/aiger.cc b/backends/aiger/aiger.cc index 0798fb35d..3e8b14dee 100644 --- a/backends/aiger/aiger.cc +++ b/backends/aiger/aiger.cc @@ -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(); 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)); |