Merge pull request #43 from wuheng01/master
Add is_pad attribute for LibertyPort
This commit is contained in:
commit
ebd71eb2ed
|
|
@ -764,6 +764,8 @@ public:
|
||||||
// Is the clock for timing checks.
|
// Is the clock for timing checks.
|
||||||
bool isCheckClk() const { return is_check_clk_; }
|
bool isCheckClk() const { return is_check_clk_; }
|
||||||
void setIsCheckClk(bool is_clk);
|
void setIsCheckClk(bool is_clk);
|
||||||
|
bool isPad() const { return is_pad_; }
|
||||||
|
void setIsPad(bool is_pad);
|
||||||
RiseFall *pulseClkTrigger() const { return pulse_clk_trigger_; }
|
RiseFall *pulseClkTrigger() const { return pulse_clk_trigger_; }
|
||||||
// Rise for high, fall for low.
|
// Rise for high, fall for low.
|
||||||
RiseFall *pulseClkSense() const { return pulse_clk_sense_; }
|
RiseFall *pulseClkSense() const { return pulse_clk_sense_; }
|
||||||
|
|
@ -863,6 +865,7 @@ protected:
|
||||||
bool level_shifter_data_:1;
|
bool level_shifter_data_:1;
|
||||||
bool is_switch_:1;
|
bool is_switch_:1;
|
||||||
bool is_disabled_constraint_:1;
|
bool is_disabled_constraint_:1;
|
||||||
|
bool is_pad_:1;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class LibertyLibrary;
|
friend class LibertyLibrary;
|
||||||
|
|
|
||||||
|
|
@ -1996,7 +1996,8 @@ LibertyPort::LibertyPort(LibertyCell *cell,
|
||||||
isolation_cell_enable_(false),
|
isolation_cell_enable_(false),
|
||||||
level_shifter_data_(false),
|
level_shifter_data_(false),
|
||||||
is_switch_(false),
|
is_switch_(false),
|
||||||
is_disabled_constraint_(false)
|
is_disabled_constraint_(false),
|
||||||
|
is_pad_(false)
|
||||||
{
|
{
|
||||||
liberty_port_ = this;
|
liberty_port_ = this;
|
||||||
min_pulse_width_[RiseFall::riseIndex()] = 0.0;
|
min_pulse_width_[RiseFall::riseIndex()] = 0.0;
|
||||||
|
|
|
||||||
|
|
@ -297,6 +297,7 @@ LibertyReader::defineVisitors()
|
||||||
defineAttrVisitor("dont_use", &LibertyReader::visitDontUse);
|
defineAttrVisitor("dont_use", &LibertyReader::visitDontUse);
|
||||||
defineAttrVisitor("is_macro_cell", &LibertyReader::visitIsMacro);
|
defineAttrVisitor("is_macro_cell", &LibertyReader::visitIsMacro);
|
||||||
defineAttrVisitor("is_memory", &LibertyReader::visitIsMemory);
|
defineAttrVisitor("is_memory", &LibertyReader::visitIsMemory);
|
||||||
|
defineAttrVisitor("pad_cell", &LibertyReader::visitIsPadCell);
|
||||||
defineAttrVisitor("is_pad", &LibertyReader::visitIsPad);
|
defineAttrVisitor("is_pad", &LibertyReader::visitIsPad);
|
||||||
defineAttrVisitor("is_clock_cell", &LibertyReader::visitIsClockCell);
|
defineAttrVisitor("is_clock_cell", &LibertyReader::visitIsClockCell);
|
||||||
defineAttrVisitor("is_level_shifter", &LibertyReader::visitIsLevelShifter);
|
defineAttrVisitor("is_level_shifter", &LibertyReader::visitIsLevelShifter);
|
||||||
|
|
@ -2887,13 +2888,13 @@ LibertyReader::visitIsMemory(LibertyAttr *attr)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
LibertyReader::visitIsPad(LibertyAttr *attr)
|
LibertyReader::visitIsPadCell(LibertyAttr *attr)
|
||||||
{
|
{
|
||||||
if (cell_) {
|
if (cell_) {
|
||||||
bool is_pad, exists;
|
bool pad_cell, exists;
|
||||||
getAttrBool(attr, is_pad, exists);
|
getAttrBool(attr, pad_cell, exists);
|
||||||
if (exists)
|
if (exists)
|
||||||
cell_->setIsPad(is_pad);
|
cell_->setIsPad(pad_cell);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3358,6 +3359,19 @@ LibertyReader::visitClock(LibertyAttr *attr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
LibertyReader::visitIsPad(LibertyAttr *attr)
|
||||||
|
{
|
||||||
|
if (ports_) {
|
||||||
|
bool is_pad, exists;
|
||||||
|
getAttrBool(attr, is_pad, exists);
|
||||||
|
if (exists) {
|
||||||
|
for (LibertyPort *port : *ports_)
|
||||||
|
port->setIsPad(is_pad);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
LibertyReader::visitCapacitance(LibertyAttr *attr)
|
LibertyReader::visitCapacitance(LibertyAttr *attr)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -187,6 +187,7 @@ public:
|
||||||
virtual void visitDontUse(LibertyAttr *attr);
|
virtual void visitDontUse(LibertyAttr *attr);
|
||||||
virtual void visitIsMacro(LibertyAttr *attr);
|
virtual void visitIsMacro(LibertyAttr *attr);
|
||||||
virtual void visitIsMemory(LibertyAttr *attr);
|
virtual void visitIsMemory(LibertyAttr *attr);
|
||||||
|
virtual void visitIsPadCell(LibertyAttr *attr);
|
||||||
virtual void visitIsPad(LibertyAttr *attr);
|
virtual void visitIsPad(LibertyAttr *attr);
|
||||||
virtual void visitIsClockCell(LibertyAttr *attr);
|
virtual void visitIsClockCell(LibertyAttr *attr);
|
||||||
virtual void visitIsLevelShifter(LibertyAttr *attr);
|
virtual void visitIsLevelShifter(LibertyAttr *attr);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue