From 0709e5bb81eb38e3c137a113da75b64b502c4ecb Mon Sep 17 00:00:00 2001 From: tangxifan Date: Sat, 24 Apr 2021 13:27:44 -0600 Subject: [PATCH] [Tool] Fixed a bug in the routing trace finder for direct connections inside repacker --- openfpga/src/repack/repack.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openfpga/src/repack/repack.cpp b/openfpga/src/repack/repack.cpp index 5e25179a5..d6cb669bc 100644 --- a/openfpga/src/repack/repack.cpp +++ b/openfpga/src/repack/repack.cpp @@ -28,6 +28,8 @@ namespace openfpga { * - sink is an input of a primitive pb_type * * Note: + * - This function is applicable ONLY to single-mode pb_types!!! Because their routing traces + * are deterministic: there is only 1 valid path from a source pin to a sink pin!!! * - If there is a fan-out of the current source pb graph pin is not a direct interconnection * the direct search should stop. * - This function is designed for pb graph without local routing @@ -58,6 +60,11 @@ bool rec_direct_search_sink_pb_graph_pins(const t_pb_graph_pin* source_pb_pin, std::vector sink_pb_pins_to_search; + /* Only support single-mode pb_type!!! */ + if (1 != source_pb_pin->parent_node->pb_type->num_modes) { + return false; + } + for (int iedge = 0; iedge < source_pb_pin->num_output_edges; ++iedge) { if (DIRECT_INTERC != source_pb_pin->output_edges[iedge]->interconnect->type) { return false;