mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
In BLIF, a .names without entries already always outputs 0
This commit is contained in:
parent
6bda612925
commit
72149aba2e
|
@ -351,24 +351,13 @@ struct BlifDumper
|
||||||
f << stringf(" %s", cstr(output));
|
f << stringf(" %s", cstr(output));
|
||||||
f << stringf("\n");
|
f << stringf("\n");
|
||||||
RTLIL::SigSpec mask = cell->parameters.at("\\LUT");
|
RTLIL::SigSpec mask = cell->parameters.at("\\LUT");
|
||||||
bool one = false;
|
|
||||||
for (int i = 0; i < (1 << width); i++)
|
for (int i = 0; i < (1 << width); i++)
|
||||||
if (mask[i] == RTLIL::S1) {
|
if (mask[i] == RTLIL::S1) {
|
||||||
for (int j = width-1; j >= 0; j--) {
|
for (int j = width-1; j >= 0; j--) {
|
||||||
f << ((i>>j)&1 ? '1' : '0');
|
f << ((i>>j)&1 ? '1' : '0');
|
||||||
}
|
}
|
||||||
f << " 1\n";
|
f << " 1\n";
|
||||||
one = true;
|
|
||||||
}
|
}
|
||||||
/* For some reason, sometimes we get LUTs with
|
|
||||||
* an all zero mask, which won't give any
|
|
||||||
* .names entries, so write one entry with
|
|
||||||
* all don't cares */
|
|
||||||
if (!one) {
|
|
||||||
for (int j = width-1; j >= 0; j--)
|
|
||||||
f << '-';
|
|
||||||
f << " 0\n";
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue