File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,25 @@ std::string FasmWriterVisitor::build_clb_prefix(const t_pb *pb, const t_pb_graph
168
168
clb_prefix = build_clb_prefix (pb, pb_graph_node->parent_pb_graph_node );
169
169
}
170
170
171
- const auto *pb_type = pb_graph_node->pb_type ;
171
+ /* Need to use the actual pb_type
172
+ * There are three cases
173
+ * 1) pb_graph_node is the root_clb: in this case fasm prefixes could change because the clb could have been placed in an
174
+ * equivalent tile.
175
+ * 2) pb_graph_node is the root_clb child: in case the clb has been placed in an equivalent tile, its child pb_types have
176
+ * different fasm prefixes. (e.g. SLICEL_X0 becomes SLICEM_X0).
177
+ * 3) pb_graph_node is non of the above: in this case the fasm prefixes should be the same even if the clb is placed in an
178
+ * equivalent tile.
179
+ *
180
+ * XXX this is a temporary workaround.
181
+ */
182
+ t_pb_type *pb_type;
183
+ if (root_clb_ == pb_graph_node) {
184
+ pb_type = blk_type_->pb_type ;
185
+ } else if (root_clb_ == pb_graph_node->parent_pb_graph_node ) {
186
+ pb_type = blk_type_->pb_graph_head ->child_pb_graph_nodes [mode_index][pb_graph_node->placement_index ]->pb_type ;
187
+ } else {
188
+ pb_type = pb_graph_node->pb_type ;
189
+ }
172
190
173
191
clb_prefix += handle_fasm_prefix (&pb_type->meta , pb_graph_node, pb_type);
174
192
You can’t perform that action at this time.
0 commit comments