57 if (rr_node_to_rt_node != NULL || rt_node_free_list != NULL
58 || rt_node_free_list != NULL) {
59 vpr_printf(TIO_MESSAGE_ERROR,
"in alloc_route_tree_timing_structs: old structures already exist.\n");
75 free(rr_node_to_rt_node);
76 rr_node_to_rt_node = NULL;
80 while (rt_node != NULL) {
81 next_node = rt_node->
u.
next;
86 rt_node_free_list = NULL;
90 while (rt_edge != NULL) {
91 next_edge = rt_edge->
next;
96 rt_edge_free_list = NULL;
109 if (rt_node != NULL) {
110 rt_node_free_list = rt_node->
u.
next;
123 rt_node_free_list = rt_node;
136 if (linked_rt_edge != NULL) {
137 rt_edge_free_list = linked_rt_edge->
next;
143 return (linked_rt_edge);
151 rt_edge_free_list = rt_edge;
171 rt_root->
inode = inode;
175 rr_node_to_rt_node[inode] = rt_root;
188 t_rt_node *start_of_new_path_rt_node, *sink_rt_node;
189 t_rt_node *unbuffered_subtree_rt_root, *subtree_parent_rt_node;
196 start_of_new_path_rt_node);
198 subtree_parent_rt_node = unbuffered_subtree_rt_root->
parent_node;
200 if (subtree_parent_rt_node != NULL) {
201 Tdel_start = subtree_parent_rt_node->
Tdel;
212 return (sink_rt_node);
222 int inode, remaining_connections_to_sink, no_route_throughs;
225 t_rt_node *rt_node, *downstream_rt_node, *sink_rt_node;
232 vpr_printf(TIO_MESSAGE_ERROR,
"in add_path_to_route_tree. Expected type = SINK (%d).\n",
SINK);
241 sink_rt_node->
inode = inode;
244 rr_node_to_rt_node[inode] = sink_rt_node;
251 #define NO_ROUTE_THROUGHS 1
252 no_route_throughs = 1;
253 if (no_route_throughs == 1)
256 if (remaining_connections_to_sink == 0) {
271 downstream_rt_node = sink_rt_node;
280 linked_rt_edge->
child = downstream_rt_node;
282 linked_rt_edge->
next = NULL;
289 rt_node->
inode = inode;
297 rr_node_to_rt_node[inode] = rt_node;
299 if (no_route_throughs == 1)
306 if (remaining_connections_to_sink == 0) {
313 remaining_connections_to_sink = 0;
317 downstream_rt_node = rt_node;
325 rt_node = rr_node_to_rt_node[inode];
328 linked_rt_edge->
child = downstream_rt_node;
336 *sink_rt_node_ptr = sink_rt_node;
337 return (downstream_rt_node);
351 rt_node = start_of_new_path_rt_node;
353 inode = rt_node->
inode;
369 while (linked_rt_edge != NULL) {
372 if (linked_rt_edge->
next != NULL) {
373 vpr_printf(TIO_MESSAGE_ERROR,
"in load_new_path_R_upstream: new routing addition is a tree (not a path).\n");
378 rt_node = linked_rt_edge->
child;
379 iswitch = linked_rt_edge->
iswitch;
380 inode = rt_node->
inode;
402 float C_downstream_addition;
404 rt_node = start_of_new_path_rt_node;
409 while (parent_rt_node != NULL &&
switch_inf[iswitch].buffered ==
FALSE) {
410 rt_node = parent_rt_node;
432 inode = subtree_rt_root->
inode;
439 subtree_rt_root->
Tdel = Tdel;
446 while (linked_rt_edge != NULL) {
447 iswitch = linked_rt_edge->
iswitch;
448 child_node = linked_rt_edge->
child;
454 linked_rt_edge = linked_rt_edge->
next;
468 while (rt_edge != NULL) {
469 child_node = rt_edge->
child;
471 next_edge = rt_edge->
next;
489 sink_rt_node = rt_node_of_sink[isink];
490 net_delay[isink] = sink_rt_node->
Tdel;
static t_rt_node * add_path_to_route_tree(struct s_heap *hptr, t_rt_node **sink_rt_node_ptr)
static t_rt_node * rt_node_free_list
t_rt_node * init_route_tree_to_source(int inet)
static t_linked_rt_edge * rt_edge_free_list
struct s_rt_node * parent_node
t_rr_node_route_inf * rr_node_route_inf
static float ** net_delay
void alloc_route_tree_timing_structs(void)
struct s_linked_rt_edge * next
static void load_rt_subtree_Tdel(t_rt_node *subtree_rt_root, float Tarrival)
void update_net_delays_from_route_tree(float *net_delay, t_rt_node **rt_node_of_sink, int inet)
static void free_linked_rt_edge(t_linked_rt_edge *rt_edge)
static void * my_malloc(int ibytes)
void free_route_tree(t_rt_node *rt_node)
static void free_rt_node(t_rt_node *rt_node)
void free_route_tree_timing_structs(void)
struct s_switch_inf * switch_inf
static t_rt_node ** rr_node_to_rt_node
static t_rt_node * update_unbuffered_ancestors_C_downstream(t_rt_node *start_of_new_path_rt_node)
static void load_new_path_R_upstream(t_rt_node *start_of_new_path_rt_node)
static t_rt_node * alloc_rt_node(void)
t_linked_rt_edge * child_list
static t_linked_rt_edge * alloc_linked_rt_edge(void)
t_rt_node * update_route_tree(struct s_heap *hptr)
static t_rt_node ** rt_node_of_sink