SRC/rr_graph_util.h File Reference
Go to the source code of this file.
Typedef Documentation
Function Documentation
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
00053
00054
00055 if(from_rr_type == CHANX)
00056 return (rr_node[to_node].xlow);
00057 else
00058 return (rr_node[to_node].ylow);
00059 }
int seg_index_of_sblock |
( |
int |
from_node, |
|
|
int |
to_node | |
|
) |
| | |
Definition at line 63 of file rr_graph_util.c.
00065 {
00066
00067
00068
00069
00070
00071
00072
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 {
00089 return (rr_node[from_node].xhigh);
00090 }
00091 else
00092 {
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
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 {
00115 return (rr_node[from_node].yhigh);
00116 }
00117 else
00118 {
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
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 }