diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2018-11-08 16:21:31 -0800 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2018-11-08 16:21:31 -0800 |
commit | 8258586c7db3989a9c7f615b2f273142ba5f22d5 (patch) | |
tree | 0e3addbcccacfdd4579a11ac6b4263af25d85977 /common | |
parent | 636a03d71ea925b141a1aacf3a96da8cc933bdf3 (diff) | |
download | nextpnr-8258586c7db3989a9c7f615b2f273142ba5f22d5.tar.gz nextpnr-8258586c7db3989a9c7f615b2f273142ba5f22d5.tar.bz2 nextpnr-8258586c7db3989a9c7f615b2f273142ba5f22d5.zip |
[common] placer to produce error when >1 cell->bel constraint
Diffstat (limited to 'common')
-rw-r--r-- | common/placer1.cc | 6 |
1 files changed, 6 insertions, 0 deletions
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++; |