59 static void SetupTypeTiming(
ezxml_t timing,
71 boolean * default_leakage_mode);
80 INP boolean timing_enabled);
87 INP boolean timing_enabled);
90 INP boolean timing_enabled);
92 OUTP int *NumDirects,
INP boolean timing_enabled);
96 INP boolean timing_enabled);
125 int i, j, k, Count, Len;
131 char **Tokens, **CurTokens;
136 if (strcmp(Prop,
"spread") == 0) {
138 }
else if (strcmp(Prop,
"custom") == 0) {
142 "[LINE %d] %s is an invalid pin location pattern.\n",
143 Locations->
line, Prop);
151 for (i = 0; i < Type->
height; ++i) {
153 for (j = 0; j < 4; ++j) {
156 for (k = 0; k < Type->
num_pins; ++k) {
157 Type->
pinloc[i][j][k] = 0;
163 Type->
height *
sizeof(
char***));
165 Type->
height *
sizeof(
int*));
166 for (i = 0; i < Type->
height; i++) {
173 Cur = Locations->
child;
179 if ((i < 0) || (i >= Type->
height)) {
181 "[LINE %d] %d is an invalid offset for type '%s'.\n",
188 if (0 == strcmp(Prop,
"left")) {
192 else if (0 == strcmp(Prop,
"top")) {
196 else if (0 == strcmp(Prop,
"right")) {
200 else if (0 == strcmp(Prop,
"bottom")) {
206 "[LINE %d] '%s' is not a valid side.\n", Cur->
line,
213 if ((
TOP == j) && (i != (Type->
height - 1))) {
215 "[LINE %d] Locations are only allowed on large block "
216 "perimeter. 'top' side should be at offset %d only.\n",
220 if ((
BOTTOM == j) && (i != 0)) {
222 "[LINE %d] Locations are only allowed on large block "
223 "perimeter. 'bottom' side should be at offset 0 only.\n",
236 for (k = 0; k < Count; k++) {
265 Type->
num_pins *
sizeof(
boolean) * capacity);
266 for (i = 0; i < Type->
num_pins * capacity; i++) {
275 for (i = 0; i < capacity; ++i) {
316 assert(pin_count == Type->
num_pins);
332 Cur = Locations->
child;
340 if (strcmp(Prop,
"perimeter") == 0) {
343 "[LINE %d] Another loc specified for perimeter.\n",
348 assert(IO_TYPE == Type);
350 }
else if (strcmp(Prop,
"fill") == 0) {
353 "[LINE %d] Another loc specified for fill.\n",
359 }
else if (strcmp(Prop,
"col") == 0) {
361 }
else if (strcmp(Prop,
"rel") == 0) {
365 "[LINE %d] Unknown grid location type '%s' for type '%s'.\n",
375 "[LINE %d] grid location property 'start' must be specified for grid location type 'col'.\n",
381 }
else if (Prop != NULL) {
383 "[LINE %d] grid location property 'start' valid for grid location type 'col' only.\n",
393 }
else if (Prop != NULL) {
395 "[LINE %d] grid location property 'repeat' valid for grid location type 'col' only.\n",
403 "[LINE %d] grid location property 'pos' must be specified for grid location type 'rel'.\n",
409 }
else if (Prop != NULL) {
411 "[LINE %d] grid location property 'pos' valid for grid location type 'rel' only.\n",
443 if (0 == strcmp(Parent->
name,
"C_constant")
444 || 0 == strcmp(Parent->
name,
"C_matrix")
445 || 0 == strcmp(Parent->
name,
"pack_pattern")) {
455 if (0 == strcmp(Parent->
name,
"delay_constant")) {
479 }
else if (0 == strcmp(Parent->
name,
"delay_matrix")) {
485 if (0 == strcmp(Prop,
"max")) {
488 assert(0 == strcmp(Prop,
"min"));
499 }
else if (0 == strcmp(Parent->
name,
"C_constant")) {
516 }
else if (0 == strcmp(Parent->
name,
"C_matrix")) {
531 }
else if (0 == strcmp(Parent->
name,
"T_setup")) {
545 }
else if (0 == strcmp(Parent->
name,
"T_clock_to_Q")) {
569 }
else if (0 == strcmp(Parent->
name,
"T_hold")) {
584 }
else if (0 == strcmp(Parent->
name,
"pack_pattern")) {
601 "[LINE %d] Unknown port type %s in %s in %s", Parent->
line,
610 int * high_index,
int * low_index) {
615 unsigned int bracket_pos;
616 unsigned int colon_pos;
618 bracket_pos = strcspn(name,
"[");
622 for (i = 0; i < pb_type->
num_ports; i++) {
623 char * compare_to = pb_type->
ports[i].
name;
625 if (strlen(compare_to) == bracket_pos
626 && strncmp(name, compare_to, bracket_pos)==0) {
627 port = &pb_type->
ports[i];
636 if (strlen(name) > bracket_pos) {
637 high = atoi(&name[bracket_pos + 1]);
639 colon_pos = strcspn(name,
":");
641 if (colon_pos < strlen(name)) {
642 low = atoi(&name[colon_pos + 1]);
651 if (high_index && low_index) {
672 "Could not find port '%s' needed for energy per toggle.",
676 if (high != port->
num_pins - 1 || low != 0) {
678 "Pin-toggle does not support pin indices (%s)", prop);
683 "Duplicate pin-toggle energy for port '%s'", port->
name);
690 "energy_per_toggle",
TRUE, 0.);
693 boolean reverse_scaled =
FALSE;
698 reverse_scaled =
TRUE;
707 "Pin-toggle 'scaled_by_static_prob' must be a single pin (%s)",
725 boolean require_dynamic_absolute =
FALSE;
726 boolean require_static_absolute =
FALSE;
727 boolean require_dynamic_C_internal =
FALSE;
737 require_static_absolute =
TRUE;
740 require_dynamic_C_internal =
TRUE;
741 require_static_absolute =
TRUE;
744 require_dynamic_absolute =
TRUE;
745 require_static_absolute =
TRUE;
751 if (require_static_absolute) {
758 if (require_dynamic_absolute) {
765 if (require_dynamic_C_internal) {
768 "C_internal",
TRUE, 0.);
792 parent_power_method =
801 parent_power_method);
802 }
else if (strcmp(prop,
"auto-size") == 0) {
804 }
else if (strcmp(prop,
"specify-size") == 0) {
806 }
else if (strcmp(prop,
"pin-toggle") == 0) {
808 }
else if (strcmp(prop,
"c-internal") == 0) {
810 }
else if (strcmp(prop,
"absolute") == 0) {
812 }
else if (strcmp(prop,
"ignore") == 0) {
814 }
else if (strcmp(prop,
"sum-of-children") == 0) {
818 "Invalid power estimation method for pb_type '%s'",
831 int num_ports, i, j, k, num_annotations;
857 if (0 == strcmp(class_name,
"lut")) {
859 }
else if (0 == strcmp(class_name,
"flipflop")) {
861 }
else if (0 == strcmp(class_name,
"memory")) {
865 "[LINE %d] Unknown class %s in pb_type %s\n", Parent->line,
866 class_name, pb_type->
name);
878 assert(pb_type->
num_pb > 0);
893 for (i = 0; i < 3; i++) {
904 while (Cur != NULL) {
919 assert(j == num_ports);
924 for (i = 0; i < pb_type->
num_ports; i++) {
954 num_annotations +=
CountChildren(Parent,
"delay_constant", 0);
968 for (i = 0; i < 7; i++) {
984 while (Cur != NULL) {
994 assert(j == num_annotations);
1007 boolean default_leakage_mode =
FALSE;
1028 while (Cur != NULL) {
1029 if (0 == strcmp(Cur->
name,
"mode")) {
1033 if (default_leakage_mode) {
1056 bool wire_defined =
FALSE;
1080 "Wire capacitance defined for port '%s'. This is an invalid option for the parent pb_type '%s' power estimation method.",
1083 wire_defined =
TRUE;
1096 "Wire length defined for port '%s'. This is an invalid option for the parent pb_type '%s' power estimation method.",
1098 }
else if (wire_defined) {
1100 "Multiple wire properties defined for port '%s', pb_type '%s'.",
1102 }
else if (strcmp(prop,
"auto") == 0) {
1103 wire_defined =
TRUE;
1106 wire_defined =
TRUE;
1119 "Wire relative length defined for port '%s'. This is an invalid option for the parent pb_type '%s' power estimation method.",
1121 }
else if (wire_defined) {
1123 "Multiple wire properties defined for port '%s', pb_type '%s'.",
1126 wire_defined =
TRUE;
1139 "Buffer size defined for port '%s'. This is an invalid option for the parent pb_type '%s' power estimation method.",
1141 }
else if (strcmp(prop,
"auto") == 0) {
1174 if (0 == strcmp(Parent->name,
"input")) {
1177 }
else if (0 == strcmp(Parent->name,
"output")) {
1180 }
else if (0 == strcmp(Parent->name,
"clock")) {
1185 "[LINE %d] Port %s cannot be both a clock and a non-clock simultaneously\n",
1186 Parent->line, Parent->name);
1189 vpr_printf(TIO_MESSAGE_ERROR,
"[LINE %d] Unknown port type %s",
1190 Parent->line, Parent->name);
1198 int num_interconnect = 0;
1199 int i, j, k, L_index, num_annotations;
1213 for (L_index = 0; L_index < 3; L_index++) {
1216 }
else if (L_index == 1) {
1221 while (Cur != NULL) {
1222 if (0 == strcmp(Cur->
name,
"complete")) {
1224 }
else if (0 == strcmp(Cur->
name,
"direct")) {
1227 assert(0 == strcmp(Cur->
name,
"mux"));
1249 num_annotations = 0;
1263 for (j = 0; j < 5; j++) {
1266 }
else if (j == 1) {
1268 }
else if (j == 2) {
1270 }
else if (j == 3) {
1272 }
else if (j == 4) {
1275 while (Cur2 != NULL) {
1286 assert(k == num_annotations);
1305 assert(i == num_interconnect);
1309 boolean * default_leakage_mode) {
1314 if (0 == strcmp(Parent->name,
"pb_type")) {
1330 while (Cur != NULL) {
1331 if (0 == strcmp(Cur->
name,
"pb_type")) {
1356 enum Fc_type def_type_in, def_type_out, ovr_type;
1357 const char *Prop, *Prop2;
1359 float def_in_val, def_out_val, ovr_val;
1360 int ipin, iclass, end_pin_index, start_pin_index, match_count;
1361 int iport, iport_pin, curr_pin, port_found;
1377 if (0 == strcmp(Prop,
"abs")) {
1379 }
else if (0 == strcmp(Prop,
"frac")) {
1381 }
else if (0 == strcmp(Prop,
"full")) {
1385 "[LINE %d] Invalid type '%s' for Fc. Only abs, frac "
1386 "and full are allowed.\n", Node->
line, Prop);
1389 switch (def_type_in) {
1396 def_in_val = (float) atof(Prop2);
1409 if (0 == strcmp(Prop,
"abs")) {
1411 }
else if (0 == strcmp(Prop,
"frac")) {
1413 }
else if (0 == strcmp(Prop,
"full")) {
1417 "[LINE %d] Invalid type '%s' for Fc. Only abs, frac "
1418 "and full are allowed.\n", Node->
line, Prop);
1421 switch (def_type_out) {
1428 def_out_val = (float) atof(Prop2);
1441 for (ipin = 0; ipin < Type->
num_pins; ipin++) {
1444 Type->
Fc[ipin] = def_out_val;
1449 Type->
Fc[ipin] = def_in_val;
1454 Type->
Fc[ipin] = -1;
1462 while (Child != NULL) {
1466 vpr_printf(TIO_MESSAGE_ERROR,
"[LINE %d] Pin child with no name "
1467 "is not allowed.\n", Child->
line);
1473 if (Prop2 != NULL) {
1474 if (0 == strcmp(Prop2,
"abs")) {
1476 }
else if (0 == strcmp(Prop2,
"frac")) {
1478 }
else if (0 == strcmp(Prop2,
"full")) {
1482 "[LINE %d] Invalid type '%s' for Fc. Only abs, frac "
1483 "and full are allowed.\n", Child->
line, Prop2);
1493 if (Prop2 == NULL) {
1495 "[LINE %d] Pin child with no fc_val specified "
1496 "is not allowed.\n", Child->
line);
1499 ovr_val = (float) atof(Prop2);
1513 Prop2 = strstr(Prop,
"[");
1514 if (Prop2 == NULL) {
1516 end_pin_index = start_pin_index = -1;
1519 match_count = sscanf(Prop,
"%s [%d:%d]", port_name,
1520 &end_pin_index, &start_pin_index);
1522 if (match_count != 3
1523 || (match_count != 1 && port_name == NULL)) {
1525 "[LINE %d] Invalid name for pin child, "
1526 "name should be in the format \"port_name\" or "
1527 "\"port_name [end_pin_index:start_pin_index]\", "
1528 " The end_pin_index and start_pin_index can be the same.\n",
1532 if (end_pin_index < 0 || start_pin_index < 0) {
1534 "[LINE %d] The pin_index should not "
1535 "be a negative value.\n", Child->
line);
1538 if (end_pin_index < start_pin_index) {
1540 "[LINE %d] The end_pin_index should "
1541 "be not be less than start_pin_index.\n",
1560 "[LINE %d] The end_pin_index for this port: %d "
1561 "cannot be greater than the number of pins in this port: %d.\n",
1562 Child->
line, end_pin_index,
1568 if (end_pin_index == -1 && start_pin_index == -1) {
1569 start_pin_index = 0;
1579 for (curr_pin = start_pin_index; curr_pin <= end_pin_index;
1583 if (ovr_val != Type->
Fc[iport_pin + curr_pin]
1591 Type->
Fc[iport_pin + curr_pin] = ovr_val;
1600 "[LINE %d] Multiple Fc override detected!\n",
1614 if (port_found ==
FALSE) {
1615 vpr_printf(TIO_MESSAGE_ERROR,
"[LINE %d] The port \"%s\" "
1616 "cannot be found.\n", Child->
line);
1624 "[LINE %d] Pin child with no fc_type specified "
1625 "is not allowed.\n", Child->
line);
1652 if (atof(Prop) < 0) {
1654 "[LINE %d] Area for type %s must be non-negative\n", Node->
line,
1675 arch->models = NULL;
1677 while (child != NULL) {
1686 temp->
index = L_index;
1694 "Required input ports not found for element '%s'.\n",
1712 if (Prop &&
my_atoi(Prop) != 0) {
1718 "[LINE %d] Signal cannot be both a clock and a non-clock signal simultaneously\n",
1729 "Required input ports not found for element '%s'.\n",
1739 "Required output ports not found for element '%s'.\n",
1761 "Required output ports not found for element '%s'.\n",
1767 temp->
next = arch->models;
1768 arch->models = temp;
1783 arch->clb_grid.IsAuto =
TRUE;
1788 arch->clb_grid.IsAuto =
FALSE;
1789 arch->clb_grid.W =
my_atoi(Prop);
1796 Prop =
FindProperty(Node,
"auto", arch->clb_grid.IsAuto);
1798 if (arch->clb_grid.IsAuto ==
FALSE) {
1800 "Auto-sizing, width and height cannot be specified\n");
1802 arch->clb_grid.Aspect = (float) atof(Prop);
1804 if (arch->clb_grid.Aspect <= 0) {
1806 "Grid aspect ratio is less than or equal to zero %g\n",
1807 arch->clb_grid.Aspect);
1816 INP boolean timing_enabled) {
1821 arch->R_minW_nmos =
GetFloatProperty(Cur,
"R_minW_nmos", timing_enabled, 0);
1822 arch->R_minW_pmos =
GetFloatProperty(Cur,
"R_minW_pmos", timing_enabled, 0);
1827 Cur =
FindElement(Node,
"timing", timing_enabled);
1847 if (strcmp(Prop,
"wilton") == 0) {
1849 }
else if (strcmp(Prop,
"universal") == 0) {
1851 }
else if (strcmp(Prop,
"subset") == 0) {
1855 "[LINE %d] Unknown property %s for switch block type x\n",
1889 boolean hasXpeak, hasWidth, hasDc;
1890 hasXpeak = hasWidth = hasDc =
FALSE;
1892 if (strcmp(Prop,
"uniform") == 0) {
1894 }
else if (strcmp(Prop,
"gaussian") == 0) {
1896 hasXpeak = hasWidth = hasDc =
TRUE;
1897 }
else if (strcmp(Prop,
"pulse") == 0) {
1899 hasXpeak = hasWidth = hasDc =
TRUE;
1900 }
else if (strcmp(Prop,
"delta") == 0) {
1901 hasXpeak = hasDc =
TRUE;
1905 "[LINE %d] Unknown property %s for chan_width_distr x\n",
1918 type = &cb_type_descriptors[EMPTY_TYPE->
index];
1919 type->
name =
"<EMPTY>";
1946 assert(pb_type->blif_model != NULL);
1951 copy->
depth = pb_type->depth;
1952 copy->
model = pb_type->model;
1964 pb_type->pb_type_power->estimation_method);
1969 for (i = 0; i < pb_type->num_ports; i++) {
1972 copy->
ports[i].
type = pb_type->ports[i].type;
1997 dot = strstr(pb_type->annotations[i].input_pins,
".");
1999 sizeof(
char) * (strlen(new_name) + strlen(dot) + 1));
2003 if (pb_type->annotations[i].output_pins != NULL) {
2004 dot = strstr(pb_type->annotations[i].output_pins,
".");
2006 sizeof(
char) * (strlen(new_name) + strlen(dot) + 1));
2017 pb_type->annotations[i].num_value_prop_pairs;
2019 sizeof(
int) * pb_type->annotations[i].num_value_prop_pairs);
2021 sizeof(
char *) * pb_type->annotations[i].num_value_prop_pairs);
2022 for (j = 0; j < pb_type->annotations[i].num_value_prop_pairs; j++) {
2025 pb_type->annotations[i].value[j]);
2038 if (strcmp(lut_pb_type->name,
"lut") != 0) {
2044 lut_pb_type->num_modes = 2;
2045 lut_pb_type->pb_type_power->leakage_default_mode = 1;
2050 lut_pb_type->modes[0].name =
my_strdup(
"wire");
2051 lut_pb_type->modes[0].parent_pb_type = lut_pb_type;
2052 lut_pb_type->modes[0].index = 0;
2053 lut_pb_type->modes[0].num_pb_type_children = 0;
2059 assert(lut_pb_type->num_ports == 2);
2060 if (strcmp(lut_pb_type->ports[0].port_class,
"lut_in") == 0) {
2061 assert(strcmp(lut_pb_type->ports[1].port_class,
"lut_out") == 0);
2062 in_port = &lut_pb_type->ports[0];
2063 out_port = &lut_pb_type->ports[1];
2065 assert(strcmp(lut_pb_type->ports[0].port_class,
"lut_out") == 0);
2066 assert(strcmp(lut_pb_type->ports[1].port_class,
"lut_in") == 0);
2067 out_port = &lut_pb_type->ports[0];
2068 in_port = &lut_pb_type->ports[1];
2070 lut_pb_type->modes[0].num_interconnect = 1;
2073 lut_pb_type->modes[0].interconnect[0].name = (
char*)
my_calloc(
2074 strlen(lut_pb_type->name) + 10,
sizeof(char));
2075 sprintf(lut_pb_type->modes[0].interconnect[0].name,
"complete:%s",
2078 lut_pb_type->modes[0].interconnect[0].input_string = (
char*)
my_calloc(
2079 strlen(lut_pb_type->name) + strlen(in_port->
name) + 2,
2081 sprintf(lut_pb_type->modes[0].interconnect[0].input_string,
"%s.%s",
2082 lut_pb_type->name, in_port->
name);
2083 lut_pb_type->modes[0].interconnect[0].output_string = (
char*)
my_calloc(
2084 strlen(lut_pb_type->name) + strlen(out_port->
name) + 2,
2086 sprintf(lut_pb_type->modes[0].interconnect[0].output_string,
"%s.%s",
2087 lut_pb_type->name, out_port->
name);
2089 lut_pb_type->modes[0].interconnect[0].parent_mode_index = 0;
2090 lut_pb_type->modes[0].interconnect[0].parent_mode = &lut_pb_type->modes[0];
2091 lut_pb_type->modes[0].interconnect[0].interconnect_power =
2094 lut_pb_type->modes[0].interconnect[0].annotations =
2097 lut_pb_type->modes[0].interconnect[0].num_annotations =
2098 lut_pb_type->num_annotations;
2099 for (i = 0; i < lut_pb_type->modes[0].interconnect[0].num_annotations;
2101 lut_pb_type->modes[0].interconnect[0].annotations[i].clock =
my_strdup(
2102 lut_pb_type->annotations[i].clock);
2103 lut_pb_type->modes[0].interconnect[0].annotations[i].input_pins =
2104 my_strdup(lut_pb_type->annotations[i].input_pins);
2105 lut_pb_type->modes[0].interconnect[0].annotations[i].output_pins =
2106 my_strdup(lut_pb_type->annotations[i].output_pins);
2107 lut_pb_type->modes[0].interconnect[0].annotations[i].line_num =
2108 lut_pb_type->annotations[i].line_num;
2109 lut_pb_type->modes[0].interconnect[0].annotations[i].format =
2110 lut_pb_type->annotations[i].format;
2111 lut_pb_type->modes[0].interconnect[0].annotations[i].type =
2112 lut_pb_type->annotations[i].type;
2113 lut_pb_type->modes[0].interconnect[0].annotations[i].num_value_prop_pairs =
2114 lut_pb_type->annotations[i].num_value_prop_pairs;
2115 lut_pb_type->modes[0].interconnect[0].annotations[i].prop =
2118 * lut_pb_type->annotations[i].num_value_prop_pairs);
2119 lut_pb_type->modes[0].interconnect[0].annotations[i].value =
2122 * lut_pb_type->annotations[i].num_value_prop_pairs);
2123 for (j = 0; j < lut_pb_type->annotations[i].num_value_prop_pairs; j++) {
2124 lut_pb_type->modes[0].interconnect[0].annotations[i].prop[j] =
2125 lut_pb_type->annotations[i].prop[j];
2126 lut_pb_type->modes[0].interconnect[0].annotations[i].value[j] =
2127 my_strdup(lut_pb_type->annotations[i].value[j]);
2133 lut_pb_type->modes[1].name =
my_strdup(lut_pb_type->name);
2134 lut_pb_type->modes[1].parent_pb_type = lut_pb_type;
2135 lut_pb_type->modes[1].index = 1;
2136 lut_pb_type->modes[1].num_pb_type_children = 1;
2142 lut_pb_type->modes[1].pb_type_children);
2144 for (i = 0; i < lut_pb_type->num_annotations; i++) {
2145 for (j = 0; j < lut_pb_type->annotations[i].num_value_prop_pairs; j++) {
2146 free(lut_pb_type->annotations[i].value[j]);
2148 free(lut_pb_type->annotations[i].value);
2149 free(lut_pb_type->annotations[i].prop);
2150 if (lut_pb_type->annotations[i].input_pins) {
2151 free(lut_pb_type->annotations[i].input_pins);
2153 if (lut_pb_type->annotations[i].output_pins) {
2154 free(lut_pb_type->annotations[i].output_pins);
2156 if (lut_pb_type->annotations[i].clock) {
2157 free(lut_pb_type->annotations[i].clock);
2160 lut_pb_type->num_annotations = 0;
2161 free(lut_pb_type->annotations);
2162 lut_pb_type->annotations = NULL;
2163 lut_pb_type->modes[1].pb_type_children[0].depth = lut_pb_type->depth + 1;
2164 lut_pb_type->modes[1].pb_type_children[0].parent_mode =
2165 &lut_pb_type->modes[1];
2168 lut_pb_type->modes[1].num_interconnect = 2;
2171 lut_pb_type->modes[1].interconnect[0].name = (
char*)
my_calloc(
2172 strlen(lut_pb_type->name) + 10,
sizeof(char));
2173 sprintf(lut_pb_type->modes[1].interconnect[0].name,
"direct:%s",
2176 lut_pb_type->modes[1].interconnect[0].input_string = (
char*)
my_calloc(
2177 strlen(lut_pb_type->name) + strlen(in_port->
name) + 2,
2179 sprintf(lut_pb_type->modes[1].interconnect[0].input_string,
"%s.%s",
2180 lut_pb_type->name, in_port->
name);
2181 lut_pb_type->modes[1].interconnect[0].output_string = (
char*)
my_calloc(
2182 strlen(default_name) + strlen(in_port->
name) + 2,
sizeof(char));
2183 sprintf(lut_pb_type->modes[1].interconnect[0].output_string,
"%s.%s",
2184 default_name, in_port->
name);
2185 lut_pb_type->modes[1].interconnect[0].infer_annotations =
TRUE;
2187 lut_pb_type->modes[1].interconnect[0].parent_mode_index = 1;
2188 lut_pb_type->modes[1].interconnect[0].parent_mode = &lut_pb_type->modes[1];
2189 lut_pb_type->modes[1].interconnect[0].interconnect_power =
2192 lut_pb_type->modes[1].interconnect[1].name = (
char*)
my_calloc(
2193 strlen(lut_pb_type->name) + 11,
sizeof(char));
2194 sprintf(lut_pb_type->modes[1].interconnect[1].name,
"direct:%s",
2198 lut_pb_type->modes[1].interconnect[1].input_string = (
char*)
my_calloc(
2199 strlen(default_name) + strlen(out_port->
name) + 4,
sizeof(char));
2200 sprintf(lut_pb_type->modes[1].interconnect[1].input_string,
"%s.%s",
2201 default_name, out_port->
name);
2202 lut_pb_type->modes[1].interconnect[1].output_string = (
char*)
my_calloc(
2203 strlen(lut_pb_type->name) + strlen(out_port->
name)
2204 + strlen(in_port->
name) + 2,
sizeof(char));
2205 sprintf(lut_pb_type->modes[1].interconnect[1].output_string,
"%s.%s",
2206 lut_pb_type->name, out_port->
name);
2207 lut_pb_type->modes[1].interconnect[1].infer_annotations =
TRUE;
2209 lut_pb_type->modes[1].interconnect[1].parent_mode_index = 1;
2210 lut_pb_type->modes[1].interconnect[1].parent_mode = &lut_pb_type->modes[1];
2211 lut_pb_type->modes[1].interconnect[1].interconnect_power =
2216 free(lut_pb_type->blif_model);
2217 lut_pb_type->blif_model = NULL;
2218 lut_pb_type->model = NULL;
2224 char *input_name, *input_port_name, *output_name, *output_port_name;
2225 int i, j, i_inter, num_pb;
2227 if (strcmp(mem_pb_type->name,
"memory_slice") != 0) {
2228 default_name =
my_strdup(
"memory_slice");
2230 default_name =
my_strdup(
"memory_slice_1bit");
2234 mem_pb_type->modes[0].name =
my_strdup(default_name);
2235 mem_pb_type->modes[0].parent_pb_type = mem_pb_type;
2236 mem_pb_type->modes[0].index = 0;
2240 for (i = 0; i < mem_pb_type->num_ports; i++) {
2241 if (mem_pb_type->ports[i].port_class != NULL
2242 && strstr(mem_pb_type->ports[i].port_class,
"data")
2243 == mem_pb_type->ports[i].port_class) {
2244 if (num_pb ==
OPEN) {
2245 num_pb = mem_pb_type->ports[i].num_pins;
2246 }
else if (num_pb != mem_pb_type->ports[i].num_pins) {
2248 "memory %s has inconsistent number of data bits %d and %d\n",
2249 mem_pb_type->name, num_pb,
2250 mem_pb_type->ports[i].num_pins);
2256 mem_pb_type->modes[0].num_pb_type_children = 1;
2260 &mem_pb_type->modes[0].pb_type_children[0]);
2261 mem_pb_type->modes[0].pb_type_children[0].depth = mem_pb_type->depth + 1;
2262 mem_pb_type->modes[0].pb_type_children[0].parent_mode =
2263 &mem_pb_type->modes[0];
2264 mem_pb_type->modes[0].pb_type_children[0].num_pb = num_pb;
2266 mem_pb_type->num_modes = 1;
2268 free(mem_pb_type->blif_model);
2269 mem_pb_type->blif_model = NULL;
2270 mem_pb_type->model = NULL;
2272 mem_pb_type->modes[0].num_interconnect = mem_pb_type->num_ports * num_pb;
2276 for (i = 0; i < mem_pb_type->modes[0].num_interconnect; i++) {
2277 mem_pb_type->modes[0].interconnect[i].parent_mode_index = 0;
2278 mem_pb_type->modes[0].interconnect[i].parent_mode =
2279 &mem_pb_type->modes[0];
2284 for (i = 0; i < mem_pb_type->num_ports; i++) {
2285 mem_pb_type->modes[0].interconnect[i_inter].type =
DIRECT_INTERC;
2286 input_port_name = mem_pb_type->ports[i].name;
2287 output_port_name = mem_pb_type->ports[i].name;
2289 if (mem_pb_type->ports[i].type ==
IN_PORT) {
2290 input_name = mem_pb_type->name;
2291 output_name = default_name;
2293 input_name = default_name;
2294 output_name = mem_pb_type->name;
2297 if (mem_pb_type->ports[i].port_class != NULL
2298 && strstr(mem_pb_type->ports[i].port_class,
"data")
2299 == mem_pb_type->ports[i].port_class) {
2301 mem_pb_type->modes[0].interconnect[i_inter].name =
2302 (
char*)
my_calloc(i_inter / 10 + 8,
sizeof(
char));
2303 sprintf(mem_pb_type->modes[0].interconnect[i_inter].name,
2304 "direct%d", i_inter);
2306 if (mem_pb_type->ports[i].type ==
IN_PORT) {
2308 mem_pb_type->modes[0].pb_type_children[0].ports[i].num_pins = 1;
2309 mem_pb_type->modes[0].pb_type_children[0].num_input_pins -=
2310 (mem_pb_type->ports[i].num_pins - 1);
2312 mem_pb_type->modes[0].interconnect[i_inter].input_string =
2314 strlen(input_name) + strlen(input_port_name)
2317 mem_pb_type->modes[0].interconnect[i_inter].input_string,
2318 "%s.%s", input_name, input_port_name);
2319 mem_pb_type->modes[0].interconnect[i_inter].output_string =
2321 strlen(output_name) + strlen(output_port_name)
2322 + 2 * (6 + num_pb / 10),
sizeof(
char));
2324 mem_pb_type->modes[0].interconnect[i_inter].output_string,
2325 "%s[%d:0].%s", output_name, num_pb - 1,
2329 mem_pb_type->modes[0].pb_type_children[0].ports[i].num_pins = 1;
2330 mem_pb_type->modes[0].pb_type_children[0].num_output_pins -=
2331 (mem_pb_type->ports[i].num_pins - 1);
2333 mem_pb_type->modes[0].interconnect[i_inter].input_string =
2335 strlen(input_name) + strlen(input_port_name)
2336 + 2 * (6 + num_pb / 10),
sizeof(
char));
2338 mem_pb_type->modes[0].interconnect[i_inter].input_string,
2339 "%s[%d:0].%s", input_name, num_pb - 1, input_port_name);
2340 mem_pb_type->modes[0].interconnect[i_inter].output_string =
2342 strlen(output_name) + strlen(output_port_name)
2345 mem_pb_type->modes[0].interconnect[i_inter].output_string,
2346 "%s.%s", output_name, output_port_name);
2350 mem_pb_type->modes[0].interconnect[i_inter].interconnect_power =
2355 for (j = 0; j < num_pb; j++) {
2357 mem_pb_type->modes[0].interconnect[i_inter].name =
2358 (
char*)
my_calloc(i_inter / 10 + j / 10 + 10,
2360 sprintf(mem_pb_type->modes[0].interconnect[i_inter].name,
2361 "direct%d_%d", i_inter, j);
2363 if (mem_pb_type->ports[i].type ==
IN_PORT) {
2364 mem_pb_type->modes[0].interconnect[i_inter].type =
2366 mem_pb_type->modes[0].interconnect[i_inter].input_string =
2368 strlen(input_name) + strlen(input_port_name)
2371 mem_pb_type->modes[0].interconnect[i_inter].input_string,
2372 "%s.%s", input_name, input_port_name);
2373 mem_pb_type->modes[0].interconnect[i_inter].output_string =
2376 + strlen(output_port_name)
2377 + 2 * (6 + num_pb / 10),
2380 mem_pb_type->modes[0].interconnect[i_inter].output_string,
2381 "%s[%d:%d].%s", output_name, j, j,
2384 mem_pb_type->modes[0].interconnect[i_inter].type =
2386 mem_pb_type->modes[0].interconnect[i_inter].input_string =
2388 strlen(input_name) + strlen(input_port_name)
2389 + 2 * (6 + num_pb / 10),
2392 mem_pb_type->modes[0].interconnect[i_inter].input_string,
2393 "%s[%d:%d].%s", input_name, j, j, input_port_name);
2394 mem_pb_type->modes[0].interconnect[i_inter].output_string =
2397 + strlen(output_port_name) + 2,
2400 mem_pb_type->modes[0].interconnect[i_inter].output_string,
2401 "%s.%s", output_name, output_port_name);
2406 mem_pb_type->modes[0].interconnect[i_inter].interconnect_power =
2414 mem_pb_type->modes[0].num_interconnect = i_inter;
2424 boolean timing_enabled) {
2437 cb_type_descriptors = *Types;
2450 CurType = Node->
child;
2455 Type = &(*Types)[i];
2464 if (strcmp(Type->
name,
"io") != 0) {
2466 "First complex block must be named \"io\" and define the inputs and outputs for the FPGA");
2492 Cur =
FindElement(CurType,
"timing", timing_enabled);
2495 SetupTypeTiming(Cur, Type);
2506 CurType = CurType->
next;
2510 if (FILL_TYPE == NULL) {
2512 "grid location type 'fill' must be specified.\n");
2521 OUTP int *NumTypes) {
2530 "Unable to load architecture file '%s'.\n", ArchFile);
2541 "This architecture version is for VPR %f while your current VPR version is " VPR_VERSION ", compatability issues may arise\n",
2577 arch->Switches, arch->num_switches, timing_enabled);
2609 ProcessPower(Next, power_arch_fake, *Types, *NumTypes);
2610 free(power_arch_fake);
2642 INP boolean timing_enabled) {
2658 memset(*Segs, 0, (*NumSegs *
sizeof(
struct s_segment_inf)));
2662 for (i = 0; i < *NumSegs; ++i) {
2669 if (strcmp(tmp,
"longline") == 0) {
2670 (*Segs)[i].longline =
TRUE;
2675 (*Segs)[i].length =
length;
2679 (*Segs)[i].frequency = 1;
2697 if (0 == strcmp(tmp,
"bidir")) {
2701 else if (0 == strcmp(tmp,
"unidir")) {
2707 "[LINE %d] Invalid switch type '%s'.\n", Node->
line, tmp);
2718 for (j = 0; j < NumSwitches; ++j) {
2719 if (0 == strcmp(tmp, Switches[j].name)) {
2723 if (j >= NumSwitches) {
2725 "[LINE %d] '%s' is not a valid mux name.\n",
2726 SubElem->
line, tmp);
2735 (*Segs)[i].wire_switch = j;
2736 (*Segs)[i].opin_switch = j;
2745 for (j = 0; j < NumSwitches; ++j) {
2746 if (0 == strcmp(tmp, Switches[j].name)) {
2750 if (j >= NumSwitches) {
2752 "[LINE %d] '%s' is not a valid wire_switch name.\n",
2753 SubElem->
line, tmp);
2756 (*Segs)[i].wire_switch = j;
2763 for (j = 0; j < NumSwitches; ++j) {
2764 if (0 == strcmp(tmp, Switches[j].name)) {
2768 if (j >= NumSwitches) {
2770 "[LINE %d] '%s' is not a valid opin_switch name.\n",
2771 SubElem->
line, tmp);
2774 (*Segs)[i].opin_switch = j;
2780 (*Segs)[i].cb_len =
length;
2781 (*Segs)[i].cb = (
boolean *)
my_malloc(length *
sizeof(
boolean));
2782 for (j = 0; j <
length; ++j) {
2783 (*Segs)[i].cb[j] =
TRUE;
2792 (*Segs)[i].sb_len = (length + 1);
2794 for (j = 0; j < (length + 1); ++j) {
2795 (*Segs)[i].sb[j] =
TRUE;
2808 const char *tmp = NULL;
2814 if (0 == strcmp(tmp,
"pattern")) {
2829 "[LINE %d] CB or SB depopulation is too long. It "
2831 "should be (length) symbols for CBs and (length+1) "
2832 "symbols for SBs.\n", Node->line);
2842 "[LINE %d] CB or SB depopulation is too long. It "
2844 "should be (length) symbols for CBs and (length+1) "
2845 "symbols for SBs.\n", Node->line);
2853 "[LINE %d] Invalid character %c in CB or "
2854 "SB depopulation list.\n", Node->line, *tmp);
2861 "[LINE %d] CB or SB depopulation is too short. It "
2862 "should be (length) symbols for CBs and (length+1) "
2863 "symbols for SBs.\n", Node->line);
2873 "[LINE %d] '%s' is not a valid type for specifying "
2874 "cb and sb depopulation.\n", Node->line, tmp);
2882 INP boolean timing_enabled) {
2884 const char *type_name;
2885 const char *switch_name;
2886 const char *buf_size;
2888 boolean has_buf_size;
2890 has_buf_size =
FALSE;
2897 if (*NumSwitches > 0) {
2900 memset(*Switches, 0, (*NumSwitches *
sizeof(
struct s_switch_inf)));
2904 for (i = 0; i < *NumSwitches; ++i) {
2910 for (j = 0; j < i; ++j) {
2911 if (0 == strcmp((*Switches)[j].
name, switch_name)) {
2913 "[LINE %d] Two switches with the same name '%s' were "
2914 "found.\n", Node->
line, switch_name);
2918 (*Switches)[i].name =
my_strdup(switch_name);
2922 if (0 == strcmp(type_name,
"mux")) {
2923 (*Switches)[i].buffered =
TRUE;
2924 has_buf_size =
TRUE;
2927 else if (0 == strcmp(type_name,
"pass_trans")) {
2928 (*Switches)[i].buffered =
FALSE;
2931 else if (0 == strcmp(type_name,
"buffer")) {
2932 (*Switches)[i].buffered =
TRUE;
2937 "[LINE %d] Invalid switch type '%s'.\n", Node->
line,
2952 if (buf_size == NULL) {
2954 }
else if (strcmp(buf_size,
"auto") == 0) {
2958 (*Switches)[i].power_buffer_size = (float) atof(buf_size);
2968 OUTP int *NumDirects,
INP boolean timing_enabled) {
2970 const char *direct_name;
2971 const char *from_pin_name;
2972 const char *to_pin_name;
2981 if (*NumDirects > 0) {
2984 memset(*Directs, 0, (*NumDirects *
sizeof(
t_direct_inf)));
2988 for (i = 0; i < *NumDirects; ++i) {
2993 for (j = 0; j < i; ++j) {
2994 if (0 == strcmp((*Directs)[j].
name, direct_name)) {
2996 "[LINE %d] Two directs with the same name '%s' were "
2997 "found.\n", Node->
line, direct_name);
3001 (*Directs)[i].name =
my_strdup(direct_name);
3009 if (0 == strcmp(to_pin_name, from_pin_name)) {
3011 "[LINE %d] The source pin and sink pin are the same: %s.\n",
3012 Node->
line, to_pin_name);
3015 (*Directs)[i].from_pin =
my_strdup(from_pin_name);
3016 (*Directs)[i].to_pin =
my_strdup(to_pin_name);
3028 if ((*Directs)[i].x_offset == 0 && (*Directs)[i].y_offset == 0) {
3030 "[LINE %d] The x_offset and y_offset are both zero, "
3031 "this is a length 0 direct chain connection.\n",
3036 (*Directs)[i].line = Node->
line;
3049 model_library[0].
index = 0;
3050 model_library[0].
inputs = NULL;
3052 model_library[0].
next = &model_library[1];
3064 model_library[1].
index = 1;
3075 model_library[1].
next = &model_library[2];
3076 model_library[1].
outputs = NULL;
3079 model_library[2].
index = 2;
3097 model_library[2].
next = &model_library[3];
3109 model_library[3].
index = 3;
3120 model_library[3].
next = NULL;
3131 arch->model_library = model_library;
3137 for (i = 0; i < NumTypes; i++) {
3138 if (Types[i].pb_type != NULL) {
3147 t_model *model_match_prim, *cur_model;
3150 char* blif_model_name;
3154 if (pb_type->blif_model != NULL) {
3157 if (strstr(pb_type->blif_model,
".subckt ") == pb_type->blif_model) {
3158 blif_model_name = strchr(pb_type->blif_model,
' ');
3160 blif_model_name = strchr(pb_type->blif_model,
'.');
3162 if (blif_model_name) {
3166 "Unknown blif model %s in pb_type %s\n",
3167 pb_type->blif_model, pb_type->name);
3171 if ((strcmp(blif_model_name,
"input") == 0)
3172 || (strcmp(blif_model_name,
"output") == 0)
3173 || (strcmp(blif_model_name,
"names") == 0)
3174 || (strcmp(blif_model_name,
"latch") == 0)) {
3175 cur_model = arch->model_library;
3177 cur_model = arch->models;
3182 model_match_prim = NULL;
3183 while (cur_model && !found) {
3185 if (strcmp(blif_model_name, cur_model->
name) == 0) {
3187 model_match_prim = cur_model;
3189 cur_model = cur_model->
next;
3191 if (found !=
TRUE) {
3192 vpr_printf(TIO_MESSAGE_ERROR,
"No matching model for pb_type %s\n",
3193 pb_type->blif_model);
3197 pb_type->model = model_match_prim;
3204 for (p = 0; p < pb_type->num_ports; p++) {
3207 model_port = model_match_prim->
inputs;
3208 while (model_port && !found) {
3209 if (strcmp(model_port->
name, pb_type->ports[p].name) == 0) {
3210 if (model_port->
size < pb_type->ports[p].num_pins) {
3211 model_port->
size = pb_type->ports[p].num_pins;
3213 if (model_port->
min_size > pb_type->ports[p].num_pins
3215 model_port->
min_size = pb_type->ports[p].num_pins;
3217 pb_type->ports[p].model_port = model_port;
3218 assert(pb_type->ports[p].type == model_port->
dir);
3219 assert(pb_type->ports[p].is_clock == model_port->
is_clock);
3222 model_port = model_port->
next;
3224 model_port = model_match_prim->
outputs;
3225 while (model_port && !found) {
3226 if (strcmp(model_port->
name, pb_type->ports[p].name) == 0) {
3227 if (model_port->
size < pb_type->ports[p].num_pins) {
3228 model_port->
size = pb_type->ports[p].num_pins;
3230 if (model_port->
min_size > pb_type->ports[p].num_pins
3232 model_port->
min_size = pb_type->ports[p].num_pins;
3234 pb_type->ports[p].model_port = model_port;
3235 assert(pb_type->ports[p].type == model_port->
dir);
3238 model_port = model_port->
next;
3240 if (found !=
TRUE) {
3242 "No matching model port for port %s in pb_type %s\n",
3243 pb_type->ports[p].name, pb_type->name);
3248 for (i = 0; i < pb_type->num_modes; i++) {
3249 for (j = 0; j < pb_type->modes[i].num_pb_type_children; j++) {
3251 &(pb_type->modes[i].pb_type_children[j]));
3261 cur_model = arch->models;
3264 vpr_printf(TIO_MESSAGE_ERROR,
"No pb_type found for model %s\n",
3268 port = cur_model->
inputs;
3288 cur_model = cur_model->
next;
3295 INP int NumTypes,
struct s_arch *arch) {
3305 for (j = 0; j < 2; j++) {
3307 fprintf(Echo,
"Printing user models \n");
3308 cur_model = arch->
models;
3309 }
else if (j == 1) {
3310 fprintf(Echo,
"Printing library models \n");
3314 fprintf(Echo,
"Model: \"%s\"\n", cur_model->
name);
3315 model_port = cur_model->
inputs;
3316 while (model_port) {
3317 fprintf(Echo,
"\tInput Ports: \"%s\" \"%d\" min_size=\"%d\"\n",
3318 model_port->
name, model_port->
size,
3320 model_port = model_port->
next;
3322 model_port = cur_model->
outputs;
3323 while (model_port) {
3324 fprintf(Echo,
"\tOutput Ports: \"%s\" \"%d\" min_size=\"%d\"\n",
3325 model_port->
name, model_port->
size,
3327 model_port = model_port->
next;
3331 while (cur_vptr != NULL) {
3332 fprintf(Echo,
"\tpb_type %d: \"%s\"\n", i,
3334 cur_vptr = cur_vptr->
next;
3338 cur_model = cur_model->
next;
3342 for (i = 0; i < NumTypes; ++i) {
3343 fprintf(Echo,
"Type: \"%s\"\n", Types[i].name);
3344 fprintf(Echo,
"\tcapacity: %d\n", Types[i].capacity);
3345 fprintf(Echo,
"\theight: %d\n", Types[i].height);
3347 for (j = 0; j < Types[i].num_pins; j++) {
3348 fprintf(Echo,
"\tis_Fc_frac: \n");
3349 fprintf(Echo,
"\t\tPin number %d: %s\n", j,
3350 (Types[i].is_Fc_frac[j] ?
"TRUE" :
"FALSE"));
3351 fprintf(Echo,
"\tis_Fc_full_flex: \n");
3352 fprintf(Echo,
"\t\tPin number %d: %s\n", j,
3353 (Types[i].is_Fc_full_flex[j] ?
"TRUE" :
"FALSE"));
3354 fprintf(Echo,
"\tFc_val: \n");
3355 fprintf(Echo,
"\tPin number %d: %f\n", j, Types[i].Fc[j]);
3357 fprintf(Echo,
"\tnum_drivers: %d\n", Types[i].num_drivers);
3358 fprintf(Echo,
"\tnum_receivers: %d\n", Types[i].num_receivers);
3359 fprintf(Echo,
"\tindex: %d\n", Types[i].index);
3360 if (Types[i].pb_type) {
3363 fprintf(Echo,
"\n");
3373 tabs = (
char*)
my_malloc((level + 1) *
sizeof(char));
3374 for (i = 0; i < level; i++) {
3379 fprintf(Echo,
"%spb_type name: %s\n", tabs, pb_type->name);
3380 fprintf(Echo,
"%s\tblif_model: %s\n", tabs, pb_type->blif_model);
3381 fprintf(Echo,
"%s\tclass_type: %d\n", tabs, pb_type->class_type);
3382 fprintf(Echo,
"%s\tnum_modes: %d\n", tabs, pb_type->num_modes);
3383 fprintf(Echo,
"%s\tnum_ports: %d\n", tabs, pb_type->num_ports);
3384 for (i = 0; i < pb_type->num_ports; i++) {
3385 fprintf(Echo,
"%s\tport %s type %d num_pins %d\n", tabs,
3386 pb_type->ports[i].name, pb_type->ports[i].type,
3387 pb_type->ports[i].num_pins);
3389 for (i = 0; i < pb_type->num_modes; i++) {
3390 fprintf(Echo,
"%s\tmode %s:\n", tabs, pb_type->modes[i].name);
3391 for (j = 0; j < pb_type->modes[i].num_pb_type_children; j++) {
3395 for (j = 0; j < pb_type->modes[i].num_interconnect; j++) {
3396 fprintf(Echo,
"%s\t\tinterconnect %d %s %s\n", tabs,
3397 pb_type->modes[i].interconnect[j].type,
3398 pb_type->modes[i].interconnect[j].input_string,
3399 pb_type->modes[i].interconnect[j].output_string);
3400 for (k = 0; k < pb_type->modes[i].interconnect[j].num_annotations;
3402 fprintf(Echo,
"%s\t\t\tannotation %s %s %d: %s\n", tabs,
3403 pb_type->modes[i].interconnect[j].annotations[k].input_pins,
3404 pb_type->modes[i].interconnect[j].annotations[k].output_pins,
3405 pb_type->modes[i].interconnect[j].annotations[k].format,
3406 pb_type->modes[i].interconnect[j].annotations[k].value[0]);
3419 power_arch->local_interc_factor = 0.5;
3439 power_arch->logical_effort_factor = 4.0;
3443 "logical_effort_factor",
TRUE, 0);
3448 power_arch->transistors_per_SRAM_bit = 6.0;
3452 "transistors_per_bit",
TRUE, 0);
3457 power_arch->mux_transistor_size = 1.0;
3461 "mux_transistor_size",
TRUE, 0);
3466 power_arch->FF_size = 1.0;
3474 power_arch->LUT_transistor_size = 1.0;
3478 "LUT_transistor_size",
TRUE, 0);
3506 if (strcmp(tmp,
"auto") == 0) {
3521 switch (parent_power_method) {
3526 return parent_power_method;
static void CreateModelLibrary(OUTP struct s_arch *arch)
t_clock_network * clock_inf
t_interconnect * interconnect
enum e_pb_type_class class_type
static t_port * findPortByName(const char *name, t_pb_type *pb_type, int *high_index, int *low_index)
FILE * my_fopen(const char *fname, const char *flag, int prompt)
boolean port_info_initialized
t_port_power * port_power
t_model_ports * model_port
struct s_pb_type * pb_type_children
union s_port_power::@5 wire
enum e_power_estimation_method_ e_power_estimation_method
e_power_estimation_method power_method_inherited(e_power_estimation_method parent_power_method)
void FreeTokens(INOUTP char ***TokensPtr)
e_power_estimation_method estimation_method
#define NUM_MODELS_IN_LIBRARY
struct s_class * class_inf
static void SyncModelsPbTypes(INOUTP struct s_arch *arch, INP t_type_descriptor *Types, INP int NumTypes)
static void ProcessComplexBlockProps(ezxml_t Node, t_type_descriptor *Type)
static void ProcessSwitches(INOUTP ezxml_t Node, OUTP struct s_switch_inf **Switches, OUTP int *NumSwitches, INP boolean timing_enabled)
static void ProcessModels(INOUTP ezxml_t Node, OUTP struct s_arch *arch)
static void ProcessMemoryClass(INOUTP t_pb_type *mem_pb_type)
struct s_grid_loc_def * grid_loc_def
void XmlReadArch(INP const char *ArchFile, INP boolean timing_enabled, OUTP struct s_arch *arch, OUTP t_type_descriptor **Types, OUTP int *NumTypes)
void * my_calloc(size_t nelem, size_t size)
struct s_model_ports * next
t_pb_type_power * pb_type_power
static void SetupEmptyType(void)
static void SetupPinLocationsAndPinClasses(ezxml_t Locations, t_type_descriptor *Type)
enum e_pin_to_pin_annotation_format format
static t_type_ptr IO_TYPE
static void ProcessCB_SB(INOUTP ezxml_t Node, INOUTP boolean *list, INP int len)
enum e_pin_location_distr pin_location_distribution
static void ProcessInterconnect(INOUTP ezxml_t Parent, t_mode *mode)
enum e_directionality directionality
enum e_pin_to_pin_annotation_type type
static void ProcessPinToPinAnnotations(ezxml_t parent, t_pin_to_pin_annotation *annotation)
static void ProcessDirects(INOUTP ezxml_t Parent, OUTP t_direct_inf **Directs, OUTP int *NumDirects, INP boolean timing_enabled)
t_power_usage absolute_power_per_instance
static void SyncModelsPbTypes_rec(INOUTP struct s_arch *arch, INP t_pb_type *pb_type)
ezxml_t ezxml_set_attr(ezxml_t xml, char *name, char *value)
t_pin_to_pin_annotation * annotations
ezxml_t ezxml_child(ezxml_t xml, const char *name)
static void ProcessClocks(ezxml_t Parent, t_clock_arch *clocks)
static void * my_malloc(int ibytes)
ezxml_t FindElement(INP ezxml_t Parent, INP const char *Name, INP boolean Required)
static void ProcessPb_TypePort(INOUTP ezxml_t Parent, t_port *port, e_power_estimation_method power_method)
#define MAX_CHANNEL_WIDTH
static void Process_Fc(ezxml_t Node, t_type_descriptor *Type)
static void alloc_and_load_default_child_for_pb_type(INOUTP t_pb_type *pb_type, char *new_name, t_pb_type *copy)
void FreeNode(INOUTP ezxml_t Node)
static t_type_ptr FILL_TYPE
char **** pin_loc_assignments
struct s_linked_vptr * pb_types
t_pin_to_pin_annotation * annotations
struct s_linked_vptr * next
int scaled_by_port_pin_idx
ezxml_t FindFirstElement(INP ezxml_t Parent, INP const char *Name, INP boolean Required)
static void ProcessPb_TypePowerEstMethod(ezxml_t Parent, t_pb_type *pb_type)
static void ProcessComplexBlocks(INOUTP ezxml_t Node, OUTP t_type_descriptor **Types, OUTP int *NumTypes, INP boolean timing_enabled)
void CountTokensInString(INP const char *Str, OUTP int *Num, OUTP int *Len)
ezxml_t ezxml_set_txt(ezxml_t xml, char *txt)
static void ProcessPb_Type(INOUTP ezxml_t Parent, t_pb_type *pb_type, t_mode *mode)
void EchoArch(INP const char *EchoFile, INP const t_type_descriptor *Types, INP int NumTypes, struct s_arch *arch)
char ** GetNodeTokens(INP ezxml_t Node)
static struct s_type_descriptor * cb_type_descriptors
static void ProcessPb_TypePowerPinToggle(ezxml_t parent, t_pb_type *pb_type)
int GetIntProperty(INP ezxml_t Parent, INP char *Name, INP boolean Required, INP int default_value)
struct s_pb_type * pb_type
struct s_pb_type * parent_pb_type
int ** num_pin_loc_assignments
float GetFloatProperty(INP ezxml_t Parent, INP char *Name, INP boolean Required, INP float default_value)
e_power_buffer_type buffer_type
enum e_grid_loc_type grid_loc_type
static void ProcessLayout(INOUTP ezxml_t Node, OUTP struct s_arch *arch)
boolean pin_toggle_initialized
static void ProcessChanWidthDistrDir(INOUTP ezxml_t Node, OUTP t_chan *chan)
ezxml_t ezxml_parse_file(const char *file)
static void ProcessSegments(INOUTP ezxml_t Parent, OUTP struct s_segment_inf **Segs, OUTP int *NumSegs, INP struct s_switch_inf *Switches, INP int NumSwitches, INP boolean timing_enabled)
int CountChildren(INP ezxml_t Node, INP const char *Name, INP int min_count)
static void ProcessLutClass(INOUTP t_pb_type *lut_pb_type)
static void SetupGridLocations(ezxml_t Locations, t_type_descriptor *Type)
static void ProcessDevice(INOUTP ezxml_t Node, OUTP struct s_arch *arch, INP boolean timing_enabled)
e_power_wire_type wire_type
static void ProcessMode(INOUTP ezxml_t Parent, t_mode *mode, boolean *default_leakage_mode)
boolean is_non_clock_global
static t_type_ptr EMPTY_TYPE
static void ProcessPb_TypePort_Power(ezxml_t Parent, t_port *port, e_power_estimation_method power_method)
int my_atoi(const char *str)
char * my_strdup(const char *str)
struct s_pb_type * parent_pb_type
t_mode_power * mode_power
boolean GetBooleanProperty(INP ezxml_t Parent, INP char *Name, INP boolean Required, INP boolean default_value)
boolean * is_Fc_full_flex
boolean is_non_clock_global
t_interconnect_power * interconnect_power
void CheckElement(INP ezxml_t Node, INP const char *Name)
static void ProcessPower(INOUTP ezxml_t parent, INOUTP t_power_arch *power_arch, INP t_type_descriptor *Types, INP int NumTypes)
static void ProcessPb_TypePower(ezxml_t Parent, t_pb_type *pb_type)
const char * FindProperty(INP ezxml_t Parent, INP const char *Name, INP boolean)
static void UpdateAndCheckModels(INOUTP struct s_arch *arch)
static void PrintPb_types_rec(INP FILE *Echo, INP const t_pb_type *pb_type, int level)
static void ProcessChanWidthDistr(INOUTP ezxml_t Node, OUTP struct s_arch *arch)