diff options
author | Alessandro Comodi <acomodi@antmicro.com> | 2022-03-04 16:53:03 +0100 |
---|---|---|
committer | Alessandro Comodi <acomodi@antmicro.com> | 2022-03-04 16:53:24 +0100 |
commit | b5d6fc8ed7bc446b1d810c82029e7b327bea5049 (patch) | |
tree | 1ea2dc8c8037d46c22cc72dad0a8f2272621ee75 /fpga_interchange/site_lut_mapping_cache.h | |
parent | 2c6ca4836fd30faa5cdbd931a352866e5a04104d (diff) | |
download | nextpnr-b5d6fc8ed7bc446b1d810c82029e7b327bea5049.tar.gz nextpnr-b5d6fc8ed7bc446b1d810c82029e7b327bea5049.tar.bz2 nextpnr-b5d6fc8ed7bc446b1d810c82029e7b327bea5049.zip |
interchange: lut map cache: remove hardcoded values
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
Diffstat (limited to 'fpga_interchange/site_lut_mapping_cache.h')
-rw-r--r-- | fpga_interchange/site_lut_mapping_cache.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fpga_interchange/site_lut_mapping_cache.h b/fpga_interchange/site_lut_mapping_cache.h index 7b1d60a4..3efd040f 100644 --- a/fpga_interchange/site_lut_mapping_cache.h +++ b/fpga_interchange/site_lut_mapping_cache.h @@ -29,12 +29,6 @@ NEXTPNR_NAMESPACE_BEGIN // Key structure used in site LUT mapping cache struct SiteLutMappingKey { - - // Maximum number of LUT cells per site - static constexpr size_t MAX_LUT_CELLS = 8; - // Maximum number of LUT inputs per cell - static constexpr size_t MAX_LUT_INPUTS = 6; - // LUT Cell data struct Cell { @@ -44,7 +38,7 @@ struct SiteLutMappingKey // Port to net assignments. These are local net ids generated during // key creation. This is to abstract connections from actual design // net names. the Id 0 means unconnected. - std::array<int32_t, MAX_LUT_INPUTS> conns; + std::vector<int32_t> conns; bool operator==(const Cell &other) const { @@ -60,7 +54,7 @@ struct SiteLutMappingKey int32_t tileType; // Tile type int32_t siteType; // Site type in that tile type size_t numCells; // LUT cell count - std::array<Cell, MAX_LUT_CELLS> cells; // LUT cell data + std::vector<Cell> cells; // LUT cell data unsigned int hash_; // Precomputed hash @@ -80,7 +74,7 @@ struct SiteLutMappingKey const auto &cell = cells[j]; hash_ = mkhash(hash_, cell.type.index); hash_ = mkhash(hash_, cell.belIndex); - for (size_t i = 0; i < MAX_LUT_INPUTS; ++i) { + for (size_t i = 0; i < cell.conns.size(); ++i) { hash_ = mkhash(hash_, cell.conns[i]); } } |