SRC/net_delay.h File Reference

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

Go to the source code of this file.

Functions

float ** alloc_net_delay (struct s_linked_vptr **chunk_list_head_ptr)
void free_net_delay (float **net_delay, struct s_linked_vptr **chunk_list_head_ptr)
void load_net_delay_from_routing (float **net_delay)
void load_constant_net_delay (float **net_delay, float delay_value)
void print_net_delay (float **net_delay, char *fname)

Function Documentation

float** alloc_net_delay ( struct s_linked_vptr **  chunk_list_head_ptr  ) 

Definition at line 125 of file net_delay.c.

00126 {
00127 
00128 /* Allocates space for the net_delay data structure                          *
00129  * [0..num_nets-1][1..num_pins-1].  I chunk the data to save space on large  *
00130  * problems.                                                                 */
00131 
00132     float **net_delay;          /* [0..num_nets-1][1..num_pins-1] */
00133     float *tmp_ptr;
00134     int inet;
00135     int chunk_bytes_avail;
00136     char *chunk_next_avail_mem;
00137 
00138     *chunk_list_head_ptr = NULL;
00139     chunk_bytes_avail = 0;
00140     chunk_next_avail_mem = NULL;
00141 
00142     net_delay = (float **)my_malloc(num_nets * sizeof(float *));
00143 
00144     for(inet = 0; inet < num_nets; inet++)
00145         {
00146             tmp_ptr =
00147                 (float *)my_chunk_malloc(((net[inet].num_sinks + 1) - 1) *
00148                                          sizeof(float), chunk_list_head_ptr,
00149                                          &chunk_bytes_avail,
00150                                          &chunk_next_avail_mem);
00151                 
00152             net_delay[inet] = tmp_ptr - 1;      /* [1..num_pins-1] */
00153         }
00154 
00155     return (net_delay);
00156 }

Here is the call graph for this function:

Here is the caller graph for this function:

void free_net_delay ( float **  net_delay,
struct s_linked_vptr **  chunk_list_head_ptr 
)

Definition at line 160 of file net_delay.c.

00162 {
00163 
00164 /* Frees the net_delay structure.  Assumes it was chunk allocated.          */
00165 
00166     free(net_delay);
00167     free_chunk_memory(*chunk_list_head_ptr);
00168     *chunk_list_head_ptr = NULL;
00169 }

Here is the call graph for this function:

Here is the caller graph for this function:

void load_constant_net_delay ( float **  net_delay,
float  delay_value 
)

Definition at line 221 of file net_delay.c.

00223 {
00224 
00225 /* Loads the net_delay array with delay_value for every source - sink        *
00226  * connection that is not on a global resource, and with 0. for every source *
00227  * - sink connection on a global net.  (This can be used to allow timing     *
00228  * analysis before routing is done with a constant net delay model).         */
00229 
00230     int inet;
00231 
00232     for(inet = 0; inet < num_nets; inet++)
00233         {
00234             if(net[inet].is_global)
00235                 {
00236                     load_one_constant_net_delay(net_delay, inet, 0.);
00237                 }
00238             else
00239                 {
00240                     load_one_constant_net_delay(net_delay, inet, delay_value);
00241                 }
00242         }
00243 }

Here is the call graph for this function:

Here is the caller graph for this function:

void load_net_delay_from_routing ( float **  net_delay  ) 

Definition at line 173 of file net_delay.c.

00174 {
00175 
00176 /* This routine loads net_delay[0..num_nets-1][1..num_pins-1].  Each entry   *
00177  * is the Elmore delay from the net source to the appropriate sink.  Both    *
00178  * the rr_graph and the routing traceback must be completely constructed     *
00179  * before this routine is called, and the net_delay array must have been     *
00180  * allocated.                                                                */
00181 
00182     t_rc_node *rc_node_free_list, *rc_root;
00183     t_linked_rc_edge *rc_edge_free_list;
00184     int inet;
00185     t_linked_rc_ptr *rr_node_to_rc_node;        /* [0..num_rr_nodes-1]  */
00186 
00187     rr_node_to_rc_node = (t_linked_rc_ptr *) my_calloc(num_rr_nodes,
00188                                                        sizeof
00189                                                        (t_linked_rc_ptr));
00190 
00191     rc_node_free_list = NULL;
00192     rc_edge_free_list = NULL;
00193 
00194     for(inet = 0; inet < num_nets; inet++)
00195         {
00196             if(net[inet].is_global)
00197                 {
00198                     load_one_constant_net_delay(net_delay, inet, 0.);
00199                 }
00200             else
00201                 {
00202                     rc_root = alloc_and_load_rc_tree(inet, &rc_node_free_list,
00203                                                      &rc_edge_free_list,
00204                                                      rr_node_to_rc_node);
00205                     load_rc_tree_C(rc_root);
00206                     load_rc_tree_T(rc_root, 0.);
00207                     load_one_net_delay(net_delay, inet, rr_node_to_rc_node);
00208                     free_rc_tree(rc_root, &rc_node_free_list,
00209                                  &rc_edge_free_list);
00210                     reset_rr_node_to_rc_node(rr_node_to_rc_node, inet);
00211                 }
00212         }
00213 
00214     free_rc_node_free_list(rc_node_free_list);
00215     free_rc_edge_free_list(rc_edge_free_list);
00216     free(rr_node_to_rc_node);
00217 }

Here is the call graph for this function:

Here is the caller graph for this function:

void print_net_delay ( float **  net_delay,
char *  fname 
)

Definition at line 704 of file net_delay.c.

00706 {
00707 
00708 /* Dumps the net delays into file fname.   */
00709 
00710     FILE *fp;
00711     int inet, ipin;
00712 
00713     fp = my_fopen(fname, "w");
00714 
00715     for(inet = 0; inet < num_nets; inet++)
00716         {
00717             fprintf(fp, "Net: %d.\n", inet);
00718             fprintf(fp, "Delays:");
00719 
00720             for(ipin = 1; ipin < (net[inet].num_sinks + 1); ipin++)
00721                 fprintf(fp, " %g", net_delay[inet][ipin]);
00722 
00723             fprintf(fp, "\n\n");
00724         }
00725 
00726     fclose(fp);
00727 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Tue Jan 5 15:25:50 2010 for VPR5.0 by  doxygen 1.6.1