192 int i, j, k, m, n, p, iedge;
194 int *num_in_ptrs, *num_out_ptrs, num_in_sets, num_out_sets;
195 float **delay_matrix;
198 int count, prior_offset;
199 int num_inputs, num_outputs;
201 in_port = out_port = NULL;
202 num_out_sets = num_in_sets = 0;
203 num_out_ptrs = num_in_ptrs = NULL;
221 num_inputs = num_outputs = 0;
228 assert(pb_graph_node->pb_type->blif_model != NULL);
230 children, annot_in_pins, &num_in_ptrs, &num_in_sets,
FALSE,
233 assert(pb_graph_node->pb_type->blif_model != NULL);
235 children, annot_in_pins, &num_in_ptrs, &num_in_sets,
FALSE,
240 children, annot_in_pins, &num_in_ptrs, &num_in_sets,
FALSE,
243 children, annot_out_pins, &num_out_ptrs, &num_out_sets,
FALSE,
248 for (i = 0; i < num_in_sets; i++) {
249 num_inputs += num_in_ptrs[i];
252 if (out_port != NULL) {
254 for (i = 0; i < num_out_sets; i++) {
255 num_outputs += num_out_ptrs[i];
261 delay_matrix = (
float**)
my_malloc(
sizeof(
float*) * num_inputs);
262 for (i = 0; i < num_inputs; i++) {
263 delay_matrix[i] = (
float*)
my_malloc(
sizeof(
float) * num_outputs);
267 my_atof_2D(delay_matrix, num_inputs, num_outputs, value);
270 for (i = 0; i < num_inputs; i++) {
271 for (j = 0; j < num_outputs; j++) {
272 delay_matrix[i][j] = atof(value);
280 for (i = 0; i < num_in_sets; i++) {
281 for (j = 0; j < num_in_ptrs[i]; j++) {
282 in_port[i][j]->
tsu_tco = delay_matrix[k][0];
287 if (pb_graph_node->pb_type->num_modes != 0) {
290 for (i = 0; i < num_in_sets; i++) {
291 for (j = 0; j < num_in_ptrs[i]; j++) {
293 for (m = 0; m < num_out_sets; m++) {
294 for (n = 0; n < num_out_ptrs[m]; n++) {
298 if (in_port[i][j]->output_edges[iedge]->output_pins[0]
301 in_port[i][j]->output_edges[iedge]->delay_max == 0);
307 if (iedge != in_port[i][j]->num_output_edges) {
320 for (i = 0; i < num_in_sets; i++) {
321 for (j = 0; j < num_in_ptrs[i]; j++) {
323 for (m = 0; m < num_out_sets; m++) {
324 for (n = 0; n < num_out_ptrs[m]; n++) {
326 if (delay_matrix[k][p] !=
OPEN) {
340 for (m = 0; m < num_out_sets; m++) {
341 for (n = 0; n < num_out_ptrs[m]; n++) {
342 if (delay_matrix[k][p] !=
OPEN) {
345 in_port[i][j]->
pin_timing[prior_offset + count] =
352 assert(in_port[i][j]->num_pin_timing == prior_offset + count);
358 if (in_port != NULL) {
359 for (i = 0; i < num_in_sets; i++) {
365 if (out_port != NULL) {
366 for (i = 0; i < num_out_sets; i++) {
372 for (i = 0; i < num_inputs; i++) {
373 free(delay_matrix[i]);
float * pin_timing_del_max
void my_atof_2D(INOUTP float **matrix, INP int max_i, INP int max_j, INP char *instring)
struct s_pb_graph_edge ** output_edges
struct s_pb_graph_pin ** pin_timing
static void * my_malloc(int ibytes)
struct s_pb_graph_node *** child_pb_graph_nodes
static void * my_realloc(void *memblk, int ibytes)
t_pb_graph_pin *** alloc_and_load_port_pin_ptrs_from_string(INP int line_num, INP const t_pb_graph_node *pb_graph_parent_node, INP t_pb_graph_node **pb_graph_children_nodes, INP const char *port_string, OUTP int **num_ptrs, OUTP int *num_sets, INP boolean is_input_to_interc, INP boolean interconnect_error_check)