Skip to content

Commit 18c377f

Browse files
committed
fixed pin location assignment bug
1 parent 8577aee commit 18c377f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vpr/src/draw/draw_types.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ ezgl::point2d t_draw_coords::get_absolute_pin_location( const ClusterBlockId clb
156156
t_pb_graph_node* pb_gnode = pb_graph_pin->parent_node;
157157
ezgl::rectangle pb_bbox = this->get_absolute_pb_bbox(clb_index, pb_gnode);
158158
int num_pins = pb_gnode->num_pins();
159-
int num_pin_in_port = pb_graph_pin->pin_number;
160-
int num_pins_in_port = pb_graph_pin->port->num_pins;
161-
int num_port = pb_graph_pin->port->index;
162-
int num_pin = num_pins_in_port * num_port + num_pin_in_port;
163159

160+
int num_pin = pb_graph_pin->pin_number;
161+
for(int i=0;i<pb_graph_pin->port->index; ++i){
162+
num_pin += pb_gnode->pb_type->ports[i].num_pins;
163+
}
164164

165165
float interval = pb_bbox.width() / (num_pins + 1);
166166

0 commit comments

Comments
 (0)