mirror of https://github.com/YosysHQ/yosys.git
Add aiger and protobuf backends binary support
This commit is contained in:
parent
d0493925ec
commit
0c380f0855
|
@ -777,7 +777,7 @@ struct AigerBackend : public Backend {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
extra_args(f, filename, args, argidx);
|
extra_args(f, filename, args, argidx, !ascii_mode);
|
||||||
|
|
||||||
Module *top_module = design->top_module();
|
Module *top_module = design->top_module();
|
||||||
|
|
||||||
|
|
|
@ -266,7 +266,7 @@ struct ProtobufBackend : public Backend {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
extra_args(f, filename, args, argidx);
|
extra_args(f, filename, args, argidx, !text_mode);
|
||||||
|
|
||||||
log_header(design, "Executing Protobuf backend.\n");
|
log_header(design, "Executing Protobuf backend.\n");
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@ struct ProtobufPass : public Pass {
|
||||||
if (!filename.empty()) {
|
if (!filename.empty()) {
|
||||||
rewrite_filename(filename);
|
rewrite_filename(filename);
|
||||||
std::ofstream *ff = new std::ofstream;
|
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()) {
|
if (ff->fail()) {
|
||||||
delete ff;
|
delete ff;
|
||||||
log_error("Can't open file `%s' for writing: %s\n", filename.c_str(), strerror(errno));
|
log_error("Can't open file `%s' for writing: %s\n", filename.c_str(), strerror(errno));
|
||||||
|
|
Loading…
Reference in New Issue