aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'fpga_interchange/arch.h')
-rw-r--r--fpga_interchange/arch.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/fpga_interchange/arch.h b/fpga_interchange/arch.h
index 1f0eb80d..25f3dbfe 100644
--- a/fpga_interchange/arch.h
+++ b/fpga_interchange/arch.h
@@ -344,7 +344,19 @@ struct Arch : ArchAPI<ArchRanges>
bool getBelGlobalBuf(BelId bel) const final
{
- // FIXME: This probably needs to be fixed!
+ auto &bel_data = bel_info(chip_info, bel);
+ IdString bel_name(bel_data.name);
+
+ // Note: Check profiles and see if this should be something other than
+ // a linear scan. Expectation is that for most arches, this will be
+ // fast enough.
+ for (int32_t global_bel : chip_info->cell_map->global_buffers) {
+ IdString global_bel_name(global_bel);
+ if (bel_name == global_bel_name) {
+ return true;
+ }
+ }
+
return false;
}