SRC/route_tree_timing.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  s_linked_rt_edge
struct  s_rt_node

Typedefs

typedef struct s_linked_rt_edge t_linked_rt_edge
typedef struct s_rt_node t_rt_node

Functions

void alloc_route_tree_timing_structs (void)
void free_route_tree_timing_structs (void)
t_rt_nodeinit_route_tree_to_source (int inet)
void free_route_tree (t_rt_node *rt_node)
t_rt_nodeupdate_route_tree (struct s_heap *hptr)
void update_net_delays_from_route_tree (float *net_delay, t_rt_node **rt_node_of_sink, int inet)

Typedef Documentation

Definition at line 10 of file route_tree_timing.h.

typedef struct s_rt_node t_rt_node

Definition at line 37 of file route_tree_timing.h.


Function Documentation

void alloc_route_tree_timing_structs ( void   ) 

Definition at line 61 of file route_tree_timing.c.

00062 {
00063 
00064 /* Allocates any structures needed to build the routing trees. */
00065 
00066     if(rr_node_to_rt_node != NULL || rt_node_free_list != NULL ||
00067        rt_node_free_list != NULL)
00068         {
00069             printf("Error in alloc_route_tree_timing_structs: old structures "
00070                    "already exist.\n");
00071             exit(1);
00072         }
00073 
00074     rr_node_to_rt_node = (t_rt_node **) my_malloc(num_rr_nodes *
00075                                                   sizeof(t_rt_node *));
00076 }

Here is the call graph for this function:

Here is the caller graph for this function:

void free_route_tree ( t_rt_node rt_node  ) 

Definition at line 529 of file route_tree_timing.c.

00530 {
00531 
00532 /* Puts the rt_nodes and edges in the tree rooted at rt_node back on the    *
00533  * free lists.  Recursive, depth-first post-order traversal.                */
00534 
00535     t_rt_node *child_node;
00536     t_linked_rt_edge *rt_edge, *next_edge;
00537 
00538     rt_edge = rt_node->u.child_list;
00539 
00540     while(rt_edge != NULL)
00541         {                       /* For all children */
00542             child_node = rt_edge->child;
00543             free_route_tree(child_node);
00544             next_edge = rt_edge->next;
00545             free_linked_rt_edge(rt_edge);
00546             rt_edge = next_edge;
00547         }
00548 
00549     free_rt_node(rt_node);
00550 }

Here is the call graph for this function:

Here is the caller graph for this function:

void free_route_tree_timing_structs ( void   ) 

Definition at line 80 of file route_tree_timing.c.

00081 {
00082 
00083 /* Frees the structures needed to build routing trees, and really frees      *
00084  * (i.e. calls free) all the data on the free lists.                         */
00085 
00086     t_rt_node *rt_node, *next_node;
00087     t_linked_rt_edge *rt_edge, *next_edge;
00088 
00089     free(rr_node_to_rt_node);
00090     rr_node_to_rt_node = NULL;
00091 
00092     rt_node = rt_node_free_list;
00093 
00094     while(rt_node != NULL)
00095         {
00096             next_node = rt_node->u.next;
00097             free(rt_node);
00098             rt_node = next_node;
00099         }
00100 
00101     rt_node_free_list = NULL;
00102 
00103     rt_edge = rt_edge_free_list;
00104 
00105     while(rt_edge != NULL)
00106         {
00107             next_edge = rt_edge->next;
00108             free(rt_edge);
00109             rt_edge = next_edge;
00110         }
00111 
00112     rt_edge_free_list = NULL;
00113 }

Here is the caller graph for this function:

t_rt_node* init_route_tree_to_source ( int  inet  ) 

Definition at line 188 of file route_tree_timing.c.

00189 {
00190 
00191 /* Initializes the routing tree to just the net source, and returns the root *
00192  * node of the rt_tree (which is just the net source).                       */
00193 
00194     t_rt_node *rt_root;
00195     int inode;
00196 
00197     rt_root = alloc_rt_node();
00198     rt_root->u.child_list = NULL;
00199     rt_root->parent_node = NULL;
00200     rt_root->parent_switch = OPEN;
00201     rt_root->re_expand = TRUE;
00202 
00203     inode = net_rr_terminals[inet][0];  /* Net source */
00204 
00205     rt_root->inode = inode;
00206     rt_root->C_downstream = rr_node[inode].C;
00207     rt_root->R_upstream = rr_node[inode].R;
00208     rt_root->Tdel = 0.5 * rr_node[inode].R * rr_node[inode].C;
00209     rr_node_to_rt_node[inode] = rt_root;
00210 
00211     return (rt_root);
00212 }

Here is the call graph for this function:

Here is the caller graph for this function:

void update_net_delays_from_route_tree ( float *  net_delay,
t_rt_node **  rt_node_of_sink,
int  inet 
)

Definition at line 554 of file route_tree_timing.c.

00557 {
00558 
00559 /* Goes through all the sinks of this net and copies their delay values from *
00560  * the route_tree to the net_delay array.                                    */
00561 
00562     int isink;
00563     t_rt_node *sink_rt_node;
00564 
00565     for(isink = 1; isink <= net[inet].num_sinks; isink++)
00566         {
00567             sink_rt_node = rt_node_of_sink[isink];
00568             net_delay[isink] = sink_rt_node->Tdel;
00569         }
00570 }

Here is the caller graph for this function:

t_rt_node* update_route_tree ( struct s_heap hptr  ) 

Definition at line 216 of file route_tree_timing.c.

00217 {
00218 
00219 /* Adds the most recently finished wire segment to the routing tree, and    *
00220  * updates the Tdel, etc. numbers for the rest of the routing tree.  hptr   *
00221  * is the heap pointer of the SINK that was reached.  This routine returns  *
00222  * a pointer to the rt_node of the SINK that it adds to the routing.        */
00223 
00224     t_rt_node *start_of_new_path_rt_node, *sink_rt_node;
00225     t_rt_node *unbuffered_subtree_rt_root, *subtree_parent_rt_node;
00226     float Tdel_start;
00227     short iswitch;
00228 
00229     start_of_new_path_rt_node = add_path_to_route_tree(hptr, &sink_rt_node);
00230     load_new_path_R_upstream(start_of_new_path_rt_node);
00231     unbuffered_subtree_rt_root =
00232         update_unbuffered_ancestors_C_downstream(start_of_new_path_rt_node);
00233 
00234     subtree_parent_rt_node = unbuffered_subtree_rt_root->parent_node;
00235 
00236     if(subtree_parent_rt_node != NULL)
00237         {                       /* Parent exists. */
00238             Tdel_start = subtree_parent_rt_node->Tdel;
00239             iswitch = unbuffered_subtree_rt_root->parent_switch;
00240             Tdel_start += switch_inf[iswitch].R *
00241                 unbuffered_subtree_rt_root->C_downstream;
00242             Tdel_start += switch_inf[iswitch].Tdel;
00243         }
00244     else
00245         {                       /* Subtree starts at SOURCE */
00246             Tdel_start = 0.;
00247         }
00248 
00249     load_rt_subtree_Tdel(unbuffered_subtree_rt_root, Tdel_start);
00250 
00251     return (sink_rt_node);
00252 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Tue Jan 5 15:26:20 2010 for VPR5.0 by  doxygen 1.6.1