support DefPin Port definition

This commit is contained in:
liulixinkerry 2024-04-24 13:48:43 +08:00
parent ae6644aabd
commit dfbc668017
2 changed files with 26 additions and 1 deletions

View File

@ -1541,6 +1541,31 @@ int readDefPin(defrCallbackType_e c, defiPin* dpin, defiUserData ud) {
}
}
if (dpin->hasPort()) {
for (int j = 0; j < dpin->numPorts(); j++) {
if (j > 1) {
string pinName(dpin->pinName());
logger.warning("DefPin %s has multiple ports. We currently only support single port definition",
pinName.c_str());
break;
}
defiPinPort* port = dpin->pinPort(j);
if (port->hasPlacement()) {
iopin->x = port->placementX();
iopin->y = port->placementY();
iopin->_orient = port->orient();
}
for (int i = 0; i < port->numLayer(); i++) {
Layer* layer = db->getLayer(string(port->layer(i)));
int lx, ly, hx, hy;
port->bounds(i, &lx, &ly, &hx, &hy);
iopin->type->addShape(*layer, lx, ly, hx, hy);
}
}
}
return 0;
}

View File

@ -171,7 +171,7 @@ class PlaceData(object):
new_num_bin_y = int(2 ** math.floor(math.log2(num_rows)))
new_num_bin_x = int(round(args.num_bin_x / args.num_bin_y * new_num_bin_y))
logger.warning(
"Given num_bin_y %d is larger than num_rows %d."
"Given num_bin_y %d is larger than num_rows %d. "
"Use (num_bin_x=%d, num_bin_y=%d) instead" %
(args.num_bin_y, num_rows, new_num_bin_x, new_num_bin_y)
)