xilinx: clean up some compiler warnings

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
gatecat 2026-08-04 10:51:04 +02:00
parent 049f38659a
commit d324239345
3 changed files with 2 additions and 7 deletions

View File

@ -113,7 +113,7 @@ bool boolstr_or_default(const dict<KeyType, Property> &ct, const KeyType &key, b
if (found == ct.end()) if (found == ct.end())
return def; return def;
if (!found->second.is_string) if (!found->second.is_string)
bool(found->second.as_int64()); return bool(found->second.as_int64());
auto str = found->second.as_string(); auto str = found->second.as_string();
if (str == "0" || boost::iequals(str, "false")) if (str == "0" || boost::iequals(str, "false"))
return false; return false;

View File

@ -275,7 +275,7 @@ void XC7Packer::pack_carries()
NetInfo *c4_di = c4->getPort(ctx->idf("DI[%d]", z)); NetInfo *c4_di = c4->getPort(ctx->idf("DI[%d]", z));
// Keep track of the total LUT input count; cannot exceed five or the LUTs cannot be packed together // Keep track of the total LUT input count; cannot exceed five or the LUTs cannot be packed together
pool<IdString> unique_lut_inputs; pool<IdString> unique_lut_inputs;
int s_inputs = 0, d_inputs = 0; int s_inputs = 0;
// Check that S and DI are validy and unqiuely driven by LUTs // Check that S and DI are validy and unqiuely driven by LUTs
// FIXME: in multiple fanout cases, cell duplication will probably be cheaper // FIXME: in multiple fanout cases, cell duplication will probably be cheaper
// than feed-throughs // than feed-throughs
@ -301,7 +301,6 @@ void XC7Packer::pack_carries()
NetInfo *ix = di_lut->getPort(ctx->idf("I%d", j)); NetInfo *ix = di_lut->getPort(ctx->idf("I%d", j));
if (ix) { if (ix) {
unique_lut_inputs.insert(ix->name); unique_lut_inputs.insert(ix->name);
d_inputs++;
} }
} }
} }

View File

@ -335,7 +335,6 @@ void XC7Packer::pack_io()
} }
flush_cells(); flush_cells();
pool<BelId> used_io_bels; pool<BelId> used_io_bels;
int unconstr_io_count = 0;
for (auto &iob : pad_and_buf) { for (auto &iob : pad_and_buf) {
CellInfo *pad = iob.first; CellInfo *pad = iob.first;
// Process location constraints // Process location constraints
@ -353,8 +352,6 @@ void XC7Packer::pack_io()
} }
if (pad->attrs.count(id_BEL)) { if (pad->attrs.count(id_BEL)) {
used_io_bels.insert(ctx->getBelByNameStr(pad->attrs.at(id_BEL).as_string())); used_io_bels.insert(ctx->getBelByNameStr(pad->attrs.at(id_BEL).as_string()));
} else {
++unconstr_io_count;
} }
} }
// Constrain unconstrained IO // Constrain unconstrained IO
@ -362,7 +359,6 @@ void XC7Packer::pack_io()
CellInfo *pad = iob.first; CellInfo *pad = iob.first;
if (!pad->attrs.count(id_BEL)) { if (!pad->attrs.count(id_BEL)) {
log_error("FIXME: unconstrained IO not supported (pad %s)\n", ctx->nameOf(pad)); log_error("FIXME: unconstrained IO not supported (pad %s)\n", ctx->nameOf(pad));
;
} }
} }
// Decompose macro IO primitives to smaller primitives that map logically to the actual IO Bels // Decompose macro IO primitives to smaller primitives that map logically to the actual IO Bels