Merge pull request #944 from Riesi/master
ice40: fix crash when packing LUTs with no output
This commit is contained in:
commit
e327050bd1
@ -49,10 +49,12 @@ static void pack_lut_lutffs(Context *ctx)
|
||||
log_info("packed cell %s into %s\n", ci->name.c_str(ctx), packed->name.c_str(ctx));
|
||||
// See if we can pack into a DFF
|
||||
// TODO: LUT cascade
|
||||
NetInfo *o = ci->ports.at(id_O).net;
|
||||
auto port = ci->ports.find(id_O);
|
||||
bool packed_dff = false;
|
||||
if (port != ci->ports.end()) {
|
||||
NetInfo *o = port->second.net;
|
||||
CellInfo *dff = net_only_drives(ctx, o, is_ff, id_D, true);
|
||||
auto lut_bel = ci->attrs.find(id_BEL);
|
||||
bool packed_dff = false;
|
||||
if (dff) {
|
||||
if (ctx->verbose)
|
||||
log_info("found attached dff %s\n", dff->name.c_str(ctx));
|
||||
@ -77,6 +79,7 @@ static void pack_lut_lutffs(Context *ctx)
|
||||
packed_dff = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!packed_dff) {
|
||||
lut_to_lc(ctx, ci, packed.get(), true);
|
||||
++lut_only;
|
||||
|
Loading…
Reference in New Issue
Block a user