VPR-6.0

vpr/SRC/route/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 16 of file route_tree_timing.h.

typedef struct s_rt_node t_rt_node

Definition at line 58 of file route_tree_timing.h.


Function Documentation

void alloc_route_tree_timing_structs ( void  )

Allocates any structures needed to build the routing trees.

Definition at line 66 of file route_tree_timing.c.

{
    if(rr_node_to_rt_node != NULL || rt_node_free_list != NULL ||
       rt_node_free_list != NULL)
        {
            printf("Error in alloc_route_tree_timing_structs: old structures "
                   "already exist.\n");
            exit(1);
        }

    rr_node_to_rt_node = (t_rt_node **) my_malloc(num_rr_nodes *
                                                  sizeof(t_rt_node *));
}

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)

Puts the rt_nodes and edges in the tree rooted at rt_node back on the free lists. Recursive, depth-first post-order traversal.

Definition at line 514 of file route_tree_timing.c.

{

    t_rt_node *child_node;
    t_linked_rt_edge *rt_edge, *next_edge;

    rt_edge = rt_node->u.child_list;

    while(rt_edge != NULL)
        {                       /* For all children */
            child_node = rt_edge->child;
            free_route_tree(child_node);
            next_edge = rt_edge->next;
            free_linked_rt_edge(rt_edge);
            rt_edge = next_edge;
        }

    free_rt_node(rt_node);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void free_route_tree_timing_structs ( void  )

Frees the structures needed to build routing trees, and really frees (i.e. calls free) all the data on the free lists.

Definition at line 84 of file route_tree_timing.c.

{
    t_rt_node *rt_node, *next_node;
    t_linked_rt_edge *rt_edge, *next_edge;

    free(rr_node_to_rt_node);
    rr_node_to_rt_node = NULL;

    rt_node = rt_node_free_list;

    while(rt_node != NULL)
        {
            next_node = rt_node->u.next;
            free(rt_node);
            rt_node = next_node;
        }

    rt_node_free_list = NULL;

    rt_edge = rt_edge_free_list;

    while(rt_edge != NULL)
        {
            next_edge = rt_edge->next;
            free(rt_edge);
            rt_edge = next_edge;
        }

    rt_edge_free_list = NULL;
}

Here is the caller graph for this function:

t_rt_node* init_route_tree_to_source ( int  inet)

Initializes the routing tree to just the net source, and returns the root node of the rt_tree (which is just the net source).

Definition at line 182 of file route_tree_timing.c.

{
    t_rt_node *rt_root;
    int inode;

    rt_root = alloc_rt_node();
    rt_root->u.child_list = NULL;
    rt_root->parent_node = NULL;
    rt_root->parent_switch = OPEN;
    rt_root->re_expand = TRUE;

    inode = net_rr_terminals[inet][0];  /* Net source */

    rt_root->inode = inode;
    rt_root->C_downstream = rr_node[inode].C;
    rt_root->R_upstream = rr_node[inode].R;
    rt_root->Tdel = 0.5 * rr_node[inode].R * rr_node[inode].C;
    rr_node_to_rt_node[inode] = rt_root;

    return (rt_root);
}

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 
)

Goes through all the sinks of this net and copies their delay values from the route_tree to the net_delay array.

Definition at line 538 of file route_tree_timing.c.

{

    int isink;
    t_rt_node *sink_rt_node;

    for(isink = 1; isink <= clb_net[inet].num_sinks; isink++)
        {
            sink_rt_node = rt_node_of_sink[isink];
            net_delay[isink] = sink_rt_node->Tdel;
        }
}

Here is the caller graph for this function:

t_rt_node* update_route_tree ( struct s_heap hptr)

Adds the most recently finished wire segment to the routing tree, and updates the Tdel, etc. numbers for the rest of the routing tree. hptr is the heap pointer of the SINK that was reached. This routine returns a pointer to the rt_node of the SINK that it adds to the routing.

Definition at line 210 of file route_tree_timing.c.

{

    t_rt_node *start_of_new_path_rt_node, *sink_rt_node;
    t_rt_node *unbuffered_subtree_rt_root, *subtree_parent_rt_node;
    float Tdel_start;
    short iswitch;

    start_of_new_path_rt_node = add_path_to_route_tree(hptr, &sink_rt_node);
    load_new_path_R_upstream(start_of_new_path_rt_node);
    unbuffered_subtree_rt_root =
        update_unbuffered_ancestors_C_downstream(start_of_new_path_rt_node);

    subtree_parent_rt_node = unbuffered_subtree_rt_root->parent_node;

    if(subtree_parent_rt_node != NULL)
        {                       /* Parent exists. */
            Tdel_start = subtree_parent_rt_node->Tdel;
            iswitch = unbuffered_subtree_rt_root->parent_switch;
            Tdel_start += switch_inf[iswitch].R *
                unbuffered_subtree_rt_root->C_downstream;
            Tdel_start += switch_inf[iswitch].Tdel;
        }
    else
        {                       /* Subtree starts at SOURCE */
            Tdel_start = 0.;
        }

    load_rt_subtree_Tdel(unbuffered_subtree_rt_root, Tdel_start);

    return (sink_rt_node);
}

Here is the call graph for this function:

Here is the caller graph for this function: