fix masterslice layer type

This commit is contained in:
liulixinkerry 2024-07-04 18:49:08 +08:00
parent 5b056336de
commit af663f475c
3 changed files with 9 additions and 3 deletions

View File

@ -39,7 +39,7 @@ class Layer {
private: private:
string _name = ""; string _name = "";
//'r' for route or 'c' for cut //'r' for route, 'c' for cut, 's' for MasterSlice(pwell, nwell)
char _type = 'x'; char _type = 'x';
Layer* _below = nullptr; Layer* _below = nullptr;
@ -79,6 +79,7 @@ public:
bool isRouteLayer() const { return _type == 'r'; } bool isRouteLayer() const { return _type == 'r'; }
bool isCutLayer() const { return _type == 'c'; } bool isCutLayer() const { return _type == 'c'; }
bool isMasterSliceLayer() const { return _type == 's'; }
Layer* getLayerBelow() const { return _below; } Layer* getLayerBelow() const { return _below; }
Layer* getLayerAbove() const { return _above; } Layer* getLayerAbove() const { return _above; }

View File

@ -748,6 +748,9 @@ int readLefLayer(lefrCallbackType_e c, lefiLayer* leflayer, lefiUserData ud) {
return 0; return 0;
} }
type = 'c'; type = 'c';
} else if (!strcmp(leflayer->type(), "MASTERSLICE")) {
logger.warning("Find MASTERSLICE layer %s.", name.c_str());
type = 's';
} else { } else {
return 0; return 0;
} }
@ -888,6 +891,8 @@ int readLefLayer(lefrCallbackType_e c, lefiLayer* leflayer, lefiUserData ud) {
} }
} }
return 0; return 0;
case 's':
return 0;
default: default:
return 0; return 0;
} }

View File

@ -330,7 +330,7 @@ void GRDatabase::addCellObs(std::vector<RectOnLayer>& allObs, db::Cell* cell) {
int dy = ctype->originY() + cell->ly(); int dy = ctype->originY() + cell->ly();
// Macro Obs // Macro Obs
for (auto& e : ctype->obs()) { for (auto& e : ctype->obs()) {
if (e.layer.rIndex == 0) continue; // ignore M1 OBS if (e.layer.rIndex <= 0) continue; // ignore M1 OBS and non-routing layer
int lx = e.lx, ly = e.ly, hx = e.hx, hy = e.hy; int lx = e.lx, ly = e.ly, hx = e.hx, hy = e.hy;
switch (cellOrient) { switch (cellOrient) {
case 2: // S case 2: // S
@ -355,7 +355,7 @@ void GRDatabase::addCellObs(std::vector<RectOnLayer>& allObs, db::Cell* cell) {
// Pin Box // Pin Box
for (auto pintype : ctype->pins) { for (auto pintype : ctype->pins) {
for (auto& e : pintype->shapes) { for (auto& e : pintype->shapes) {
if (e.layer.rIndex == 0) continue; // ignore M1 OBS if (e.layer.rIndex <= 0) continue; // ignore M1 OBS and non-routing layer
int lx = e.lx, ly = e.ly, hx = e.hx, hy = e.hy; int lx = e.lx, ly = e.ly, hx = e.hx, hy = e.hy;
switch (cellOrient) { switch (cellOrient) {
case 2: // S case 2: // S