Determine other primitive pins that belong to the same pin class as reference pin
399 int active_pin_class;
401 if (reference_pb_graph_pin->port->type ==
IN_PORT) {
402 marker = *input_count + 10;
403 active_pin_class = *input_count;
405 marker = -10 - *output_count;
406 active_pin_class = *output_count;
408 assert(reference_pb_graph_pin->parent_node->pb_type->num_modes == 0);
409 assert(current_pb_graph_pin->parent_node->pb_type->depth >= depth);
410 assert(current_pb_graph_pin->port->type !=
INOUT_PORT);
411 if (current_pb_graph_pin->scratch_pad != marker) {
412 if (current_pb_graph_pin->parent_node->pb_type->num_modes == 0) {
413 current_pb_graph_pin->scratch_pad = marker;
415 if (current_pb_graph_pin->parent_pin_class[depth] ==
OPEN
416 && reference_pb_graph_pin->port->is_clock
417 == current_pb_graph_pin->port->is_clock
418 && reference_pb_graph_pin->port->type
419 == current_pb_graph_pin->port->type) {
420 current_pb_graph_pin->parent_pin_class[depth] =
423 for (i = 0; i < current_pb_graph_pin->num_input_edges; i++) {
425 current_pb_graph_pin->input_edges[i]->num_input_pins == 1);
427 current_pb_graph_pin->input_edges[i]->input_pins[0],
428 reference_pb_graph_pin, depth, input_count,
431 for (i = 0; i < current_pb_graph_pin->num_output_edges; i++) {
433 current_pb_graph_pin->output_edges[i]->num_output_pins == 1);
435 current_pb_graph_pin->output_edges[i]->output_pins[0],
436 reference_pb_graph_pin, depth, input_count,
439 }
else if (current_pb_graph_pin->parent_node->pb_type->depth == depth) {
440 current_pb_graph_pin->scratch_pad = marker;
441 if (current_pb_graph_pin->port->type ==
OUT_PORT) {
442 if (reference_pb_graph_pin->port->type ==
OUT_PORT) {
444 current_pb_graph_pin->pin_class = active_pin_class;
446 for (i = 0; i < current_pb_graph_pin->num_input_edges; i++) {
448 current_pb_graph_pin->input_edges[i]->num_input_pins == 1);
450 current_pb_graph_pin->input_edges[i]->input_pins[0],
451 reference_pb_graph_pin, depth, input_count,
455 if (current_pb_graph_pin->port->type ==
IN_PORT) {
456 if (reference_pb_graph_pin->port->type ==
IN_PORT) {
458 current_pb_graph_pin->pin_class = active_pin_class;
460 for (i = 0; i < current_pb_graph_pin->num_output_edges; i++) {
462 current_pb_graph_pin->output_edges[i]->num_output_pins == 1);
464 current_pb_graph_pin->output_edges[i]->output_pins[0],
465 reference_pb_graph_pin, depth, input_count,
469 }
else if (current_pb_graph_pin->parent_node->pb_type->depth > depth) {
471 current_pb_graph_pin->scratch_pad = marker;
472 for (i = 0; i < current_pb_graph_pin->num_input_edges; i++) {
474 current_pb_graph_pin->input_edges[i]->num_input_pins == 1);
476 current_pb_graph_pin->input_edges[i]->input_pins[0],
477 reference_pb_graph_pin, depth, input_count,
480 for (i = 0; i < current_pb_graph_pin->num_output_edges; i++) {
482 current_pb_graph_pin->output_edges[i]->num_output_pins == 1);
484 current_pb_graph_pin->output_edges[i]->output_pins[0],
485 reference_pb_graph_pin, depth, input_count,
static void expand_pb_graph_node_and_load_pin_class_by_depth(INOUTP t_pb_graph_pin *current_pb_graph_pin, INP t_pb_graph_pin *reference_pb_graph_pin, INP int depth, OUTP int *input_count, OUTP int *output_count)