Proper count for IO resources
This commit is contained in:
parent
b384ce3205
commit
400bc09151
@ -585,12 +585,10 @@ bool NgUltraImpl::isBelLocationValid(BelId bel, bool explain_invalid) const
|
||||
// Bel bucket functions
|
||||
IdString NgUltraImpl::getBelBucketForCellType(IdString cell_type) const
|
||||
{
|
||||
if (cell_type.in(id_IOP,id_IP,id_OP))
|
||||
return id_IOP;
|
||||
else if (cell_type.in(id_IOTP,id_ITP,id_OTP))
|
||||
return id_IOTP;
|
||||
else if (cell_type.in(id_BFR))
|
||||
return id_DFR;
|
||||
if (cell_type.in(id_IOP,id_IP,id_OP,id_IOTP,id_ITP,id_OTP))
|
||||
return ctx->idf("IOP/IOTP");
|
||||
else if (cell_type.in(id_BFR, id_DFR, id_DDFR))
|
||||
return ctx->idf("DFR/DDFR");
|
||||
else if (cell_type.in(id_RF, id_RFSP))
|
||||
return id_RF;
|
||||
else if (cell_type.in(id_XHRF, id_XWRF, id_XPRF))
|
||||
@ -609,6 +607,16 @@ IdString NgUltraImpl::getBelBucketForCellType(IdString cell_type) const
|
||||
return cell_type;
|
||||
}
|
||||
|
||||
BelBucketId NgUltraImpl::getBelBucketForBel(BelId bel) const
|
||||
{
|
||||
IdString bel_type = ctx->getBelType(bel);
|
||||
if (bel_type.in(id_IOP, id_IOTP))
|
||||
return ctx->idf("IOP/IOTP");
|
||||
else if (bel_type.in(id_DFR, id_DDFR))
|
||||
return ctx->idf("DFR/DDFR");
|
||||
return bel_type;
|
||||
}
|
||||
|
||||
bool NgUltraImpl::isValidBelForCellType(IdString cell_type, BelId bel) const
|
||||
{
|
||||
IdString bel_type = ctx->getBelType(bel);
|
||||
|
@ -48,6 +48,7 @@ struct NgUltraImpl : HimbaechelAPI
|
||||
bool isBelLocationValid(BelId bel, bool explain_invalid = false) const override;
|
||||
IdString getBelBucketForCellType(IdString cell_type) const override;
|
||||
bool isValidBelForCellType(IdString cell_type, BelId bel) const override;
|
||||
BelBucketId getBelBucketForBel(BelId bel) const override;
|
||||
|
||||
// Flow management
|
||||
void pack() override;
|
||||
|
@ -738,7 +738,7 @@ void NgUltraPacker::pack_iobs(void)
|
||||
}
|
||||
ci.type = new_type;
|
||||
ctx->bindBel(bel, &ci, PlaceStrength::STRENGTH_LOCKED);
|
||||
if (!ctx->isValidBelForCellType(ctx->getBelBucketForCellType(new_type),bel))
|
||||
if (!ctx->isValidBelForCellType(new_type,bel))
|
||||
log_error("Invalid type of IO for specified location %s %s.\n", new_type.c_str(ctx), ctx->getBelType(bel).c_str(ctx));
|
||||
to_update.push_back(&ci);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user