Detect when there is no next cell for DSP chain

This commit is contained in:
Miodrag Milanovic 2024-09-12 09:39:12 +02:00
parent 400bc09151
commit b9b9b241ab

View File

@ -457,6 +457,10 @@ namespace ng_ultra {
Loc getNextLocInDSPChain(const NgUltraImpl *impl, Loc loc)
{
BelId bel = impl->ctx->getBelByLocation(loc);
if (impl->dsp_cascade.count(bel)==0) {
loc.z = -1; // End of chain
return loc;
}
BelId dsp = impl->dsp_cascade.at(bel);
return impl->ctx->getBelLocation(dsp);
}