diff options
author | gatecat <gatecat@ds0.me> | 2021-03-23 17:33:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-23 17:33:55 +0000 |
commit | 3cc50a5744beeae63ffb9ecd2064666e90d26be4 (patch) | |
tree | c8e66be71668d0baf20f2e92bc1755d8ebbabafa /fpga_interchange/arch.h | |
parent | 323da87dec3819a100b7d5d19a1ddd2340f26caa (diff) | |
parent | 720f64ea6017fa3e42f80eba64cc615c64788914 (diff) | |
download | nextpnr-3cc50a5744beeae63ffb9ecd2064666e90d26be4.tar.gz nextpnr-3cc50a5744beeae63ffb9ecd2064666e90d26be4.tar.bz2 nextpnr-3cc50a5744beeae63ffb9ecd2064666e90d26be4.zip |
Merge pull request #644 from litghost/add_global_buffers
[FPGA interchange] Add support for global buffers from chipdb.
Diffstat (limited to 'fpga_interchange/arch.h')
-rw-r--r-- | fpga_interchange/arch.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/fpga_interchange/arch.h b/fpga_interchange/arch.h index 0522034f..ece8be7f 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; } |