From b9b9b241ab2a7fe08842bb7a6de3a6196586e715 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 12 Sep 2024 09:39:12 +0200 Subject: [PATCH] Detect when there is no next cell for DSP chain --- himbaechel/uarch/ng-ultra/location_map.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/himbaechel/uarch/ng-ultra/location_map.cc b/himbaechel/uarch/ng-ultra/location_map.cc index db709f6c..92ece523 100644 --- a/himbaechel/uarch/ng-ultra/location_map.cc +++ b/himbaechel/uarch/ng-ultra/location_map.cc @@ -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); }