aboutsummaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-12-17 11:13:57 +0100
committerClifford Wolf <clifford@clifford.at>2014-12-17 11:13:57 +0100
commitb95051fb709d1212abf4b3dad71204b15d6ff1db (patch)
tree9297699b9f0c86200714c3d550208e410367ccd2 /backends
parente01254d8244d16f98d6a99a2cd8c1692fe334dce (diff)
downloadyosys-b95051fb709d1212abf4b3dad71204b15d6ff1db.tar.gz
yosys-b95051fb709d1212abf4b3dad71204b15d6ff1db.tar.bz2
yosys-b95051fb709d1212abf4b3dad71204b15d6ff1db.zip
Fixed writing of $lut cells in BLIF backend
Diffstat (limited to 'backends')
-rw-r--r--backends/blif/blif.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/backends/blif/blif.cc b/backends/blif/blif.cc
index aaf85f460..366ed0369 100644
--- a/backends/blif/blif.cc
+++ b/backends/blif/blif.cc
@@ -227,14 +227,14 @@ struct BlifDumper
log_assert(output.size() == 1);
f << stringf(" %s", cstr(output));
f << stringf("\n");
- auto mask = cell->parameters.at("\\LUT").as_string();
- for (int i = 0; i < (1 << width); i++) {
- if (mask[i] == '0') continue;
- for (int j = width-1; j >= 0; j--) {
- f << ((i>>j)&1 ? '1' : '0');
+ RTLIL::SigSpec mask = cell->parameters.at("\\LUT");
+ for (int i = 0; i < (1 << width); i++)
+ if (mask[i] == RTLIL::S1) {
+ for (int j = width-1; j >= 0; j--) {
+ f << ((i>>j)&1 ? '1' : '0');
+ }
+ f << " 1\n";
}
- f << stringf(" %c\n", mask[i]);
- }
continue;
}