aboutsummaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-09-29 09:21:51 -0700
committerEddie Hung <eddie@fpgeh.com>2019-09-29 09:21:51 -0700
commitf3e150d9a5a71a554a99c619ae5389f687c381ef (patch)
tree6f5145bfc48768fd858032b8a9a4295804d26a8f /backends
parent79b6edb6397c530a7304eb4334f95324a4208aba (diff)
parentce0631c371f69f0132ea9ee4bc8f5ee576dbb1a3 (diff)
downloadyosys-f3e150d9a5a71a554a99c619ae5389f687c381ef.tar.gz
yosys-f3e150d9a5a71a554a99c619ae5389f687c381ef.tar.bz2
yosys-f3e150d9a5a71a554a99c619ae5389f687c381ef.zip
Merge remote-tracking branch 'origin/master' into xaig_dff
Diffstat (limited to 'backends')
-rw-r--r--backends/aiger/aiger.cc2
-rw-r--r--backends/aiger/xaiger.cc2
-rw-r--r--backends/btor/btor.cc5
-rw-r--r--backends/protobuf/protobuf.cc4
4 files changed, 8 insertions, 5 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/aiger/xaiger.cc b/backends/aiger/xaiger.cc
index 5d41d49b9..aa18d3e1b 100644
--- a/backends/aiger/xaiger.cc
+++ b/backends/aiger/xaiger.cc
@@ -1143,7 +1143,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();
diff --git a/backends/btor/btor.cc b/backends/btor/btor.cc
index 4472993d4..f617b7ec2 100644
--- a/backends/btor/btor.cc
+++ b/backends/btor/btor.cc
@@ -897,9 +897,12 @@ struct BtorWorker
int sid = get_bv_sid(GetSize(s));
int nid = next_nid++;
- btorf("%d input %d %s\n", nid, sid);
+ btorf("%d input %d\n", nid, sid);
nid_width[nid] = GetSize(s);
+ for (int j = 0; j < GetSize(s); j++)
+ nidbits.push_back(make_pair(nid, j));
+
i += GetSize(s)-1;
continue;
}
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));