Skip to content

Commit

Permalink
fixed discrepancy between function def and impl
Browse files Browse the repository at this point in the history
  • Loading branch information
KA7E committed Jun 5, 2024
1 parent 9e1ffcf commit abf42b9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions libs/libarchfpga/src/physical_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,7 @@ struct t_pin_to_pin_annotation {
* parent_pb_graph_node : parent pb graph node
* total_primitive_count : Total number of this primitive type in the cluster. If there are 10 ALMs per cluster
* and 2 FFs per ALM (given the mode of the parent of this primitive) then the total is 20.
* flat_site_index : index of this primitive within its primitive type in this cluster; in [0,...,total_primitive_count]
* illegal_modes : vector containing illegal modes that result in conflicts during routing
*/
class t_pb_graph_node {
Expand Down Expand Up @@ -1281,6 +1282,7 @@ class t_pb_graph_node {
int num_output_pin_class; /* number of output pin classes that this pb_graph_node has */

int total_primitive_count; /* total number of this primitive type in the cluster */
int flat_site_index; /* index of this primitive within sites of its type in this cluster */

/* Interconnect instances for this pb
* Only used for power
Expand Down
7 changes: 7 additions & 0 deletions vpr/src/pack/pb_type_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ static void alloc_and_load_pb_graph(t_pb_graph_node* pb_graph_node,
t_pb_graph_node* parent_pb_graph_node,
t_pb_type* pb_type,
const int index,
const int flat_index,
bool load_power_structures,
int& pin_count_in_cluster);

Expand Down Expand Up @@ -151,6 +152,7 @@ void alloc_and_load_all_pb_graphs(bool load_power_structures, bool is_flat) {
nullptr,
type.pb_type,
0,
0,
load_power_structures,
pin_count_in_cluster);
type.pb_graph_head->total_pb_pins = pin_count_in_cluster;
Expand Down Expand Up @@ -224,6 +226,7 @@ static void alloc_and_load_pb_graph(t_pb_graph_node* pb_graph_node,
t_pb_graph_node* parent_pb_graph_node,
t_pb_type* pb_type,
const int index,
const int flat_index,
bool load_power_structures,
int& pin_count_in_cluster) {
int i, j, k, i_input, i_output, i_clockport;
Expand All @@ -237,6 +240,7 @@ static void alloc_and_load_pb_graph(t_pb_graph_node* pb_graph_node,
pb_graph_node->num_clock_ports = 0;

pb_graph_node->total_primitive_count = 0;
pb_graph_node->flat_site_index = flat_index;

/* Generate ports for pb graph node */
for (i = 0; i < pb_type->num_ports; i++) {
Expand Down Expand Up @@ -349,10 +353,13 @@ static void alloc_and_load_pb_graph(t_pb_graph_node* pb_graph_node,
sizeof(t_pb_graph_node*));
for (j = 0; j < pb_type->modes[i].num_pb_type_children; j++) {
pb_graph_node->child_pb_graph_nodes[i][j] = (t_pb_graph_node*)vtr::calloc(pb_type->modes[i].pb_type_children[j].num_pb, sizeof(t_pb_graph_node));
int base = flat_index*(pb_type->modes[i].pb_type_children[j].num_pb);

for (k = 0; k < pb_type->modes[i].pb_type_children[j].num_pb; k++) {
alloc_and_load_pb_graph(&pb_graph_node->child_pb_graph_nodes[i][j][k],
pb_graph_node,
&pb_type->modes[i].pb_type_children[j],
base + k,
k,
load_power_structures,
pin_count_in_cluster);
Expand Down
4 changes: 2 additions & 2 deletions vpr/src/pack/re_cluster_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ bool start_new_cluster_for_mol(t_pack_molecule* molecule,
t_lb_router_data** router_data,
PartitionRegion& temp_cluster_pr,
NocGroupId& temp_cluster_noc_grp_id,
const int detailed_routing_stage = 1);
const int& detailed_routing_stage = 1);

/**
* @brief A function that packs a molecule into an existing cluster
Expand All @@ -109,7 +109,7 @@ bool pack_mol_in_existing_cluster(t_pack_molecule* molecule,
bool during_packing,
t_clustering_data& clustering_data,
t_lb_router_data*& router_data,
const int detailed_routing_stage = 1);
const int& detailed_routing_stage = 1);

/**
* @brief A function that fix the clustered netlist if the move is performed
Expand Down

0 comments on commit abf42b9

Please sign in to comment.