From 724c14d1f7fe53c200060429ea328a031e4f6759 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Thu, 4 Jul 2024 11:09:01 -0700 Subject: [PATCH] [core] fixed a bug on build top module connections on perimeter gsb when cbs occur --- openfpga/src/fabric/build_top_module_connection.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openfpga/src/fabric/build_top_module_connection.cpp b/openfpga/src/fabric/build_top_module_connection.cpp index e6a98cd46..38b0491a9 100644 --- a/openfpga/src/fabric/build_top_module_connection.cpp +++ b/openfpga/src/fabric/build_top_module_connection.cpp @@ -760,6 +760,12 @@ static void add_top_module_nets_connect_sb_and_cb( } if (RIGHT == side_manager.get_side() || BOTTOM == side_manager.get_side()) { + /* Only for the condition where cbs are on perimeter, the neighbour cb will be invalid + * Bypass in such case on finding neighbour cbs + */ + if (instance_sb_coordinate.x() == device_rr_gsb.get_gsb_range().x() || instance_sb_coordinate.y() == 0) { + continue; + } const RRGSB& adjacent_gsb = device_rr_gsb.get_gsb(module_gsb_cb_coordinate); if (false == adjacent_gsb.is_cb_exist(cb_type)) {