3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-07 09:55:20 +00:00

gcc-4.6 build fixes

This commit is contained in:
Clifford Wolf 2015-09-01 12:51:23 +02:00
parent 522176c946
commit b10ea0550d
2 changed files with 3 additions and 3 deletions

View file

@ -133,7 +133,7 @@ void parse_blif(RTLIL::Design *design, std::istream &f, std::string dff_name)
if (v[0] == '"') { if (v[0] == '"') {
std::string str(v+1); std::string str(v+1);
if (str.back() == '"') if (str.back() == '"')
str.pop_back(); str.resize(str.size()-1);
const_v = Const(str); const_v = Const(str);
} else { } else {
int n = strlen(v); int n = strlen(v);

View file

@ -348,9 +348,9 @@ struct WreducePass : public Pass {
continue; continue;
for (auto c : module->selected_cells()) for (auto c : module->selected_cells())
if (c->type.in({"$reduce_and", "$reduce_or", "$reduce_xor", "$reduce_xnor", "$reduce_bool", if (c->type.in("$reduce_and", "$reduce_or", "$reduce_xor", "$reduce_xnor", "$reduce_bool",
"$lt", "$le", "$eq", "$ne", "$eqx", "$nex", "$ge", "$gt", "$lt", "$le", "$eq", "$ne", "$eqx", "$nex", "$ge", "$gt",
"$logic_not", "$logic_and", "$logic_or"}) && GetSize(c->getPort("\\Y")) > 1) { "$logic_not", "$logic_and", "$logic_or") && GetSize(c->getPort("\\Y")) > 1) {
SigSpec sig = c->getPort("\\Y"); SigSpec sig = c->getPort("\\Y");
c->setPort("\\Y", sig[0]); c->setPort("\\Y", sig[0]);
c->setParam("\\Y_WIDTH", 1); c->setParam("\\Y_WIDTH", 1);