From ea91182216b3ea86d650053750090c9dea7e9d43 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Tue, 26 Sep 2023 11:40:42 -0700 Subject: [PATCH] [core] check option conflicts --- openfpga/src/base/openfpga_build_fabric_template.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openfpga/src/base/openfpga_build_fabric_template.h b/openfpga/src/base/openfpga_build_fabric_template.h index d3d94c3e7..c2bb2c08c 100644 --- a/openfpga/src/base/openfpga_build_fabric_template.h +++ b/openfpga/src/base/openfpga_build_fabric_template.h @@ -130,6 +130,15 @@ int build_fabric_template(T& openfpga_ctx, const Command& cmd, return CMD_EXEC_FATAL_ERROR; } } + /* Conflicts: duplicate_grid_pin does not support any port merge */ + if (cmd_context.option_enable(cmd, opt_duplicate_grid_pin)) { + if (openfpga_ctx.arch().tile_annotations.tiles_to_merge_ports().size() > 0) { + VTR_LOG_ERROR( + "Option '%s' requires no tile ports to be merged due to a conflict!\n", + cmd.option_name(opt_duplicate_grid_pin).c_str()); + return CMD_EXEC_FATAL_ERROR; + } + } if (true == cmd_context.option_enable(cmd, opt_compress_routing)) { compress_routing_hierarchy_template(