14 int wire_to_ipin_switch);
17 t_ivec *** L_rr_node_indices);
23 int num_indices_to_load,
t_rr_type rr_type,
int nodes_per_chan,
43 INP int nodes_per_chan,
int wire_to_ipin_switch,
46 int iseg, length, i, index;
58 rr_indexed_data[i].ortho_cost_index =
OPEN;
59 rr_indexed_data[i].seg_index =
OPEN;
60 rr_indexed_data[i].inv_length =
OPEN;
61 rr_indexed_data[i].T_linear =
OPEN;
62 rr_indexed_data[i].T_quadratic =
OPEN;
63 rr_indexed_data[i].C_load =
OPEN;
71 for (iseg = 0; iseg < num_segment; iseg++) {
74 rr_indexed_data[index].ortho_cost_index = index + num_segment;
76 if (segment_inf[iseg].longline)
79 length =
std::min(segment_inf[iseg].length,
nx);
81 rr_indexed_data[index].inv_length = 1. / length;
82 rr_indexed_data[index].seg_index = iseg;
86 nodes_per_chan, L_rr_node_indices, segment_inf);
90 for (iseg = 0; iseg < num_segment; iseg++) {
93 rr_indexed_data[index].ortho_cost_index = index - num_segment;
95 if (segment_inf[iseg].longline)
98 length =
std::min(segment_inf[iseg].length,
ny);
100 rr_indexed_data[index].inv_length = 1. / length;
101 rr_indexed_data[index].seg_index = iseg;
105 num_segment,
CHANY, nodes_per_chan, L_rr_node_indices, segment_inf);
108 base_cost_type, wire_to_ipin_switch);
114 int wire_to_ipin_switch) {
119 float delay_normalization_fac;
126 delay_normalization_fac = 1.;
136 * delay_normalization_fac;
139 delay_normalization_fac;
147 L_rr_node_indices, nodes_per_chan);
180 t_ivec *** L_rr_node_indices) {
184 const int clb_dist = 3;
186 int inode, itrack, cost_index;
187 float Tdel, Tdel_sum, frac_num_seg;
191 for (itrack = 0; itrack < nodes_per_chan; itrack++) {
197 + frac_num_seg * frac_num_seg
199 Tdel_sum += Tdel / (float) clb_dist;
202 for (itrack = 0; itrack < nodes_per_chan; itrack++) {
208 + frac_num_seg * frac_num_seg
210 Tdel_sum += Tdel / (float) clb_dist;
213 return (Tdel_sum / (2. * nodes_per_chan));
217 int nodes_per_chan) {
222 int inode, ipin, iclass, iedge, itype, num_edges, to_switch, to_node,
234 ipin, L_rr_node_indices);
237 for (iedge = 0; iedge < num_edges; iedge++) {
249 Tdel /= (float) num_conn;
254 int num_indices_to_load,
t_rr_type rr_type,
int nodes_per_chan,
263 int itrack, iseg, inode, cost_index, iswitch;
264 float *C_total, *R_total;
265 int *num_nodes_of_index;
266 float Rnode, Cnode, Rsw, Tsw;
275 for (itrack = 0; itrack < nodes_per_chan; itrack++) {
279 num_nodes_of_index[cost_index]++;
280 C_total[cost_index] +=
rr_node[inode].
C;
281 R_total[cost_index] +=
rr_node[inode].
R;
284 for (cost_index = index_start;
285 cost_index < index_start + num_indices_to_load; cost_index++) {
287 if (num_nodes_of_index[cost_index] == 0) {
292 Rnode = R_total[cost_index] / num_nodes_of_index[cost_index];
293 Cnode = C_total[cost_index] / num_nodes_of_index[cost_index];
301 + 0.5 * Rnode * Cnode;
316 free(num_nodes_of_index);
t_rr_indexed_data * rr_indexed_data
void * my_calloc(size_t nelem, size_t size)
int get_rr_node_index(int x, int y, t_rr_type rr_type, int ptc, t_ivec ***L_rr_node_indices)
static void * my_malloc(int ibytes)
static float get_delay_normalization_fac(int nodes_per_chan, t_ivec ***L_rr_node_indices)
void alloc_and_load_rr_indexed_data(INP t_segment_inf *segment_inf, INP int num_segment, INP t_ivec ***L_rr_node_indices, INP int nodes_per_chan, int wire_to_ipin_switch, enum e_base_cost_type base_cost_type)
struct s_switch_inf * switch_inf
static void load_rr_indexed_data_base_costs(int nodes_per_chan, t_ivec ***L_rr_node_indices, enum e_base_cost_type base_cost_type, int wire_to_ipin_switch)
struct s_type_descriptor * type_descriptors
static float get_average_opin_delay(t_ivec ***L_rr_node_indices, int nodes_per_chan)
static void load_rr_indexed_data_T_values(int index_start, int num_indices_to_load, t_rr_type rr_type, int nodes_per_chan, t_ivec ***L_rr_node_indices, t_segment_inf *segment_inf)