241 boolean is_primitive;
243 is_primitive = (
boolean) (pb_graph_node->pb_type->num_modes == 0);
245 for (i = 0; i < pb_graph_node->num_input_ports; i++) {
246 for (j = 0; j < pb_graph_node->num_input_pins[i]; j++) {
247 index = pb_graph_node->input_pins[i][j].pin_count_in_cluster;
250 pb_graph_node->input_pins[i][j].num_input_edges;
252 pb_graph_node->input_pins[i][j].num_output_edges;
254 + (float)
rr_node[index].num_edges / 5 + ((
float)j/(float)pb_graph_node->num_input_pins[i])/(float)10;
256 rr_node[index].num_edges *
sizeof(
int));
267 for (k = 0; k < pb_graph_node->input_pins[i][j].num_output_edges;
271 pb_graph_node->input_pins[i][j].output_edges[k]->output_pins[0]->pin_count_in_cluster;
274 pb_graph_node->input_pins[i][j].output_edges[k]->num_output_pins == 1);
279 assert(
rr_node[index].num_edges == 0);
299 if(pb_graph_node->pb_type->class_type ==
LUT_CLASS) {
311 for (i = 0; i < pb_graph_node->num_output_ports; i++) {
312 for (j = 0; j < pb_graph_node->num_output_pins[i]; j++) {
313 index = pb_graph_node->output_pins[i][j].pin_count_in_cluster;
316 pb_graph_node->output_pins[i][j].num_input_edges;
318 pb_graph_node->output_pins[i][j].num_output_edges;
320 + (float)
rr_node[index].num_edges / 5;
322 rr_node[index].num_edges *
sizeof(
int));
333 for (k = 0; k < pb_graph_node->output_pins[i][j].num_output_edges;
337 pb_graph_node->output_pins[i][j].output_edges[k]->output_pins[0]->pin_count_in_cluster;
340 pb_graph_node->output_pins[i][j].output_edges[k]->num_output_pins == 1);
349 for (i = 0; i < pb_graph_node->num_clock_ports; i++) {
350 for (j = 0; j < pb_graph_node->num_clock_pins[i]; j++) {
351 index = pb_graph_node->clock_pins[i][j].pin_count_in_cluster;
354 pb_graph_node->clock_pins[i][j].num_input_edges;
356 pb_graph_node->clock_pins[i][j].num_output_edges;
358 + (float)
rr_node[index].num_edges / 5;
360 rr_node[index].num_edges *
sizeof(
int));
371 for (k = 0; k < pb_graph_node->clock_pins[i][j].num_output_edges;
375 pb_graph_node->clock_pins[i][j].output_edges[k]->output_pins[0]->pin_count_in_cluster;
378 pb_graph_node->clock_pins[i][j].output_edges[k]->num_output_pins == 1);
383 assert(
rr_node[index].num_edges == 0);
406 for (i = 0; i < pb_graph_node->pb_type->num_modes; i++) {
407 for (j = 0; j < pb_graph_node->pb_type->modes[i].num_pb_type_children;
411 < pb_graph_node->pb_type->modes[i].pb_type_children[j].num_pb;
414 &pb_graph_node->child_pb_graph_nodes[i][j][k], arch, i);
void alloc_and_load_rr_graph_for_pb_graph_node(INP t_pb_graph_node *pb_graph_node, INP const t_arch *arch, int mode)
void * my_calloc(size_t nelem, size_t size)
static void * my_malloc(int ibytes)
t_pb_graph_pin * pb_graph_pin
float pack_intrinsic_cost