aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/arch.cc
diff options
context:
space:
mode:
Diffstat (limited to 'fpga_interchange/arch.cc')
-rw-r--r--fpga_interchange/arch.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/fpga_interchange/arch.cc b/fpga_interchange/arch.cc
index e8a8cdc1..faf3c9d1 100644
--- a/fpga_interchange/arch.cc
+++ b/fpga_interchange/arch.cc
@@ -45,14 +45,7 @@ static std::pair<std::string, std::string> split_identifier_name_dot(const std::
// -----------------------------------------------------------------------
-void IdString::initialize_arch(const BaseCtx *ctx)
-{
-#define X(t) initialize_add(ctx, #t, ID_##t);
-
-#include "constids.inc"
-
-#undef X
-}
+void IdString::initialize_arch(const BaseCtx *ctx) {}
// -----------------------------------------------------------------------
@@ -70,6 +63,13 @@ Arch::Arch(ArchArgs args) : args(args)
log_error("Unable to read chipdb %s\n", args.chipdb.c_str());
}
+ // Read strings from constids into IdString database, checking that list
+ // is unique and matches expected constid value.
+ int id = 1;
+ for (const auto &constid : *chip_info->constids) {
+ IdString::initialize_add(this, constid.get(), id++);
+ }
+
tileStatus.resize(chip_info->tiles.size());
for (int i = 0; i < chip_info->tiles.size(); i++) {
tileStatus[i].boundcells.resize(chip_info->tile_types[chip_info->tiles[i].type].bel_data.size());