Liberty::isClockCell

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2023-11-25 17:02:33 -08:00
parent ca11aa7be0
commit 04ee02419e
4 changed files with 23 additions and 0 deletions

View File

@ -423,6 +423,8 @@ public:
void setIsMemory(bool is_memory);
bool isPad() const { return is_pad_; }
void setIsPad(bool is_pad);
bool isClockCell() const { return is_clock_cell_; }
void setIsClockCell(bool is_clock_cell);
bool isLevelShifter() const { return is_level_shifter_; }
void setIsLevelShifter(bool is_level_shifter);
LevelShifterType levelShifterType() const { return level_shifter_type_; }
@ -564,6 +566,7 @@ protected:
bool is_macro_;
bool is_memory_;
bool is_pad_;
bool is_clock_cell_;
bool is_level_shifter_;
LevelShifterType level_shifter_type_;
bool is_isolation_cell_;

View File

@ -925,6 +925,7 @@ LibertyCell::LibertyCell(LibertyLibrary *library,
is_macro_(false),
is_memory_(false),
is_pad_(false),
is_clock_cell_(false),
is_level_shifter_(false),
level_shifter_type_(LevelShifterType::HL_LH),
is_isolation_cell_(false),
@ -1077,6 +1078,12 @@ LibertyCell::LibertyCell::setIsPad(bool is_pad)
is_pad_ = is_pad;
}
void
LibertyCell::LibertyCell::setIsClockCell(bool is_clock_cell)
{
is_clock_cell_ = is_clock_cell;
}
void
LibertyCell::setIsLevelShifter(bool is_level_shifter)
{

View File

@ -298,6 +298,7 @@ LibertyReader::defineVisitors()
defineAttrVisitor("is_macro", &LibertyReader::visitIsMacro);
defineAttrVisitor("is_memory", &LibertyReader::visitIsMemory);
defineAttrVisitor("is_pad", &LibertyReader::visitIsPad);
defineAttrVisitor("is_clock_cell", &LibertyReader::visitIsClockCell);
defineAttrVisitor("is_level_shifter", &LibertyReader::visitIsLevelShifter);
defineAttrVisitor("level_shifter_type", &LibertyReader::visitLevelShifterType);
defineAttrVisitor("is_isolation_cell", &LibertyReader::visitIsIsolationCell);
@ -2819,6 +2820,17 @@ LibertyReader::visitIsPad(LibertyAttr *attr)
}
}
void
LibertyReader::visitIsClockCell(LibertyAttr *attr)
{
if (cell_) {
bool is_clock_cell, exists;
getAttrBool(attr, is_clock_cell, exists);
if (exists)
cell_->setIsClockCell(is_clock_cell);
}
}
void
LibertyReader::visitIsLevelShifter(LibertyAttr *attr)
{

View File

@ -188,6 +188,7 @@ public:
virtual void visitIsMacro(LibertyAttr *attr);
virtual void visitIsMemory(LibertyAttr *attr);
virtual void visitIsPad(LibertyAttr *attr);
virtual void visitIsClockCell(LibertyAttr *attr);
virtual void visitIsLevelShifter(LibertyAttr *attr);
virtual void visitLevelShifterType(LibertyAttr *attr);
virtual void visitIsIsolationCell(LibertyAttr *attr);