@@ -133,7 +133,7 @@ static bool check_input_pins_equivalence(const t_pb_graph_pin* cur_pin,
133
133
/* *
134
134
* Allocate memory into types and load the pb graph with interconnect edges
135
135
*/
136
- void alloc_and_load_all_pb_graphs (bool load_power_structures) {
136
+ void alloc_and_load_all_pb_graphs (bool load_power_structures, bool is_flat ) {
137
137
int errors;
138
138
edges_head = nullptr ;
139
139
num_edges_head = nullptr ;
@@ -148,8 +148,10 @@ void alloc_and_load_all_pb_graphs(bool load_power_structures) {
148
148
type.pb_type , 0 , load_power_structures, pin_count_in_cluster);
149
149
type.pb_graph_head ->total_pb_pins = pin_count_in_cluster;
150
150
load_pin_classes_in_pb_graph_head (type.pb_graph_head );
151
- set_pins_logical_num (&type);
152
- add_logical_classes (&type);
151
+ if (is_flat) {
152
+ set_pins_logical_num (&type);
153
+ add_logical_classes (&type);
154
+ }
153
155
} else {
154
156
type.pb_graph_head = nullptr ;
155
157
VTR_ASSERT (&type == device_ctx.EMPTY_LOGICAL_BLOCK_TYPE );
@@ -465,11 +467,6 @@ static std::vector<const t_pb_graph_node*> get_all_logical_block_pb_graph_nodes(
465
467
}
466
468
467
469
static void add_logical_classes (t_logical_block_type* logical_block) {
468
- /* Since logical blocks are allocated using "alloc" command, data structures are not initialized properly.
469
- * This is why we need to assign a new object to it. This won't be needed when logical blocks are allocated
470
- * using "new" operator.
471
- */
472
- logical_block->pb_pin_to_class_logical_num_mapping = std::unordered_map<const t_pb_graph_pin*, int >();
473
470
474
471
auto pb_graph_nodes = get_all_logical_block_pb_graph_nodes (logical_block);
475
472
for (auto pb_graph_node : pb_graph_nodes) {
0 commit comments