Skip to content

Commit c9cbeae

Browse files
committed
pin_criticality
1 parent 0c715b6 commit c9cbeae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vpr/src/route/route_timing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ void alloc_timing_driven_route_structs(float** pin_criticality_ptr,
893893

894894
int max_sinks = std::max(get_max_pins_per_net() - 1, 0);
895895

896-
*pin_criticality_ptr = new float[max_sinks] - 1; /* First sink is pin #1. */
896+
*pin_criticality_ptr = new float[max_sinks + 1]; /* First sink is pin #1. First element is empty.*/
897897
*sink_order_ptr = new int[max_sinks] - 1;
898898
*rt_node_of_sink_ptr = new t_rt_node*[max_sinks] - 1;
899899

@@ -908,7 +908,7 @@ void free_timing_driven_route_structs(float* pin_criticality, int* sink_order, t
908908
/* Frees all the structures needed only by the timing-driven router. */
909909

910910
// coverity[offset_free : Intentional]
911-
delete[](pin_criticality + 1); /* Starts at index 1. */
911+
delete[](pin_criticality); /* Starts at index 1. */
912912
// coverity[offset_free : Intentional]
913913
delete[](sink_order + 1);
914914
// coverity[offset_free : Intentional]

0 commit comments

Comments
 (0)