From 8258586c7db3989a9c7f615b2f273142ba5f22d5 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Thu, 8 Nov 2018 16:21:31 -0800 Subject: [common] placer to produce error when >1 cell->bel constraint --- common/placer1.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common/placer1.cc') diff --git a/common/placer1.cc b/common/placer1.cc index 01f822a5..0d7c0701 100644 --- a/common/placer1.cc +++ b/common/placer1.cc @@ -118,6 +118,12 @@ class SAPlacer loc_name.c_str(), bel_type.c_str(ctx), cell->name.c_str(ctx), cell->type.c_str(ctx)); } + auto bound_cell = ctx->getBoundBelCell(bel); + if (bound_cell) { + log_error("Cell \'%s\' cannot be bound to bel \'%s\' since it is already bound to cell \'%s\'\n", + cell->name.c_str(ctx), loc_name.c_str(), bound_cell->name.c_str(ctx)); + } + ctx->bindBel(bel, cell, STRENGTH_USER); locked_bels.insert(bel); placed_cells++; -- cgit v1.2.3