SRC/rr_graph_util.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_edge

Typedefs

typedef struct s_linked_edge t_linked_edge

Functions

t_linked_edgeinsert_in_edge_list (t_linked_edge *head, int edge, short iswitch)
void free_linked_edge_soft (t_linked_edge *edge_ptr, t_linked_edge **free_list_head_ptr)
int seg_index_of_cblock (t_rr_type from_rr_type, int to_node)
int seg_index_of_sblock (int from_node, int to_node)

Typedef Documentation

typedef struct s_linked_edge t_linked_edge

Definition at line 7 of file rr_graph_util.h.


Function Documentation

void free_linked_edge_soft ( t_linked_edge edge_ptr,
t_linked_edge **  free_list_head_ptr 
)
t_linked_edge* insert_in_edge_list ( t_linked_edge head,
int  edge,
short  iswitch 
)
int seg_index_of_cblock ( t_rr_type  from_rr_type,
int  to_node 
)

Definition at line 48 of file rr_graph_util.c.

00050 {
00051 
00052 /* Returns the segment number (distance along the channel) of the connection *
00053  * box from from_rr_type (CHANX or CHANY) to to_node (IPIN).                 */
00054 
00055     if(from_rr_type == CHANX)
00056         return (rr_node[to_node].xlow);
00057     else                        /* CHANY */
00058         return (rr_node[to_node].ylow);
00059 }

Here is the caller graph for this function:

int seg_index_of_sblock ( int  from_node,
int  to_node 
)

Definition at line 63 of file rr_graph_util.c.

00065 {
00066 
00067 /* Returns the segment number (distance along the channel) of the switch box *
00068  * box from from_node (CHANX or CHANY) to to_node (CHANX or CHANY).  The     *
00069  * switch box on the left side of a CHANX segment at (i,j) has seg_index =   *
00070  * i-1, while the switch box on the right side of that segment has seg_index *
00071  * = i.  CHANY stuff works similarly.  Hence the range of values returned is *
00072  * 0 to nx (if from_node is a CHANX) or 0 to ny (if from_node is a CHANY).   */
00073 
00074     t_rr_type from_rr_type, to_rr_type;
00075 
00076     from_rr_type = rr_node[from_node].type;
00077     to_rr_type = rr_node[to_node].type;
00078 
00079     if(from_rr_type == CHANX)
00080         {
00081             if(to_rr_type == CHANY)
00082                 {
00083                     return (rr_node[to_node].xlow);
00084                 }
00085             else if(to_rr_type == CHANX)
00086                 {
00087                     if(rr_node[to_node].xlow > rr_node[from_node].xlow)
00088                         {       /* Going right */
00089                             return (rr_node[from_node].xhigh);
00090                         }
00091                     else
00092                         {       /* Going left */
00093                             return (rr_node[to_node].xhigh);
00094                         }
00095                 }
00096             else
00097                 {
00098                     printf
00099                         ("Error in seg_index_of_sblock:  to_node %d is of type %d.\n",
00100                          to_node, to_rr_type);
00101                     exit(1);
00102                 }
00103         }
00104     /* End from_rr_type is CHANX */
00105     else if(from_rr_type == CHANY)
00106         {
00107             if(to_rr_type == CHANX)
00108                 {
00109                     return (rr_node[to_node].ylow);
00110                 }
00111             else if(to_rr_type == CHANY)
00112                 {
00113                     if(rr_node[to_node].ylow > rr_node[from_node].ylow)
00114                         {       /* Going up */
00115                             return (rr_node[from_node].yhigh);
00116                         }
00117                     else
00118                         {       /* Going down */
00119                             return (rr_node[to_node].yhigh);
00120                         }
00121                 }
00122             else
00123                 {
00124                     printf
00125                         ("Error in seg_index_of_sblock:  to_node %d is of type %d.\n",
00126                          to_node, to_rr_type);
00127                     exit(1);
00128                 }
00129         }
00130     /* End from_rr_type is CHANY */
00131     else
00132         {
00133             printf
00134                 ("Error in seg_index_of_sblock:  from_node %d is of type %d.\n",
00135                  from_node, from_rr_type);
00136             exit(1);
00137         }
00138 }

Here is the caller graph for this function:


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