liberty bus port slew/cap/fanout limits
This commit is contained in:
parent
4ef072645a
commit
d562879a27
|
|
@ -217,7 +217,7 @@ protected:
|
|||
ConcretePort(ConcreteCell *cell,
|
||||
const char *name,
|
||||
bool is_bus,
|
||||
int from_index,
|
||||
int from_index,
|
||||
int to_index,
|
||||
bool is_bundle,
|
||||
ConcretePortSeq *member_ports);
|
||||
|
|
|
|||
|
|
@ -2018,7 +2018,8 @@ LibertyPort::slewLimit(const MinMax *min_max,
|
|||
}
|
||||
|
||||
void
|
||||
LibertyPort::setSlewLimit(float slew, const MinMax *min_max)
|
||||
LibertyPort::setSlewLimit(float slew,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
slew_limit_.setValue(min_max, slew);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2799,9 +2799,9 @@ LibertyReader::visitDirection(LibertyAttr *attr)
|
|||
LibertyPortSeq::Iterator port_iter(ports_);
|
||||
while (port_iter.hasNext()) {
|
||||
LibertyPort *port = port_iter.next();
|
||||
// Tristate enable function sets direction to tristate; don't
|
||||
// clobber it.
|
||||
if (!port->direction()->isTristate())
|
||||
// Tristate enable function sets direction to tristate; don't
|
||||
// clobber it.
|
||||
port->setDirection(port_dir);
|
||||
}
|
||||
}
|
||||
|
|
@ -2839,6 +2839,21 @@ LibertyReader::visitThreeState(LibertyAttr *attr)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
LibertyReader::visitPorts(std::function<void (LibertyPort *port)> func)
|
||||
{
|
||||
LibertyPortSeq::Iterator port_iter(ports_);
|
||||
while (port_iter.hasNext()) {
|
||||
LibertyPort *port = port_iter.next();
|
||||
func(port);
|
||||
LibertyPortMemberIterator member_iter(port);
|
||||
while (member_iter.hasNext()) {
|
||||
LibertyPort *member = member_iter.next();
|
||||
func(member);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
LibertyReader::visitClock(LibertyAttr *attr)
|
||||
{
|
||||
|
|
@ -2994,11 +3009,9 @@ LibertyReader::visitFanout(LibertyAttr *attr,
|
|||
bool exists;
|
||||
getAttrFloat(attr, fanout, exists);
|
||||
if (exists) {
|
||||
LibertyPortSeq::Iterator port_iter(ports_);
|
||||
while (port_iter.hasNext()) {
|
||||
LibertyPort *port = port_iter.next();
|
||||
port->setFanoutLimit(fanout, min_max);
|
||||
}
|
||||
visitPorts([&] (LibertyPort *port) {
|
||||
port->setFanoutLimit(fanout, min_max);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3024,11 +3037,9 @@ LibertyReader::visitMinMaxTransition(LibertyAttr *attr, MinMax *min_max)
|
|||
getAttrFloat(attr, value, exists);
|
||||
if (exists) {
|
||||
value *= time_scale_;
|
||||
LibertyPortSeq::Iterator port_iter(ports_);
|
||||
while (port_iter.hasNext()) {
|
||||
LibertyPort *port = port_iter.next();
|
||||
port->setSlewLimit(value, min_max);
|
||||
}
|
||||
visitPorts([&] (LibertyPort *port) {
|
||||
port->setSlewLimit(value, min_max);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3056,10 +3067,9 @@ LibertyReader::visitMinMaxCapacitance(LibertyAttr *attr,
|
|||
if (exists) {
|
||||
value *= cap_scale_;
|
||||
LibertyPortSeq::Iterator port_iter(ports_);
|
||||
while (port_iter.hasNext()) {
|
||||
LibertyPort *port = port_iter.next();
|
||||
port->setCapacitanceLimit(value, min_max);
|
||||
}
|
||||
visitPorts([&] (LibertyPort *port) {
|
||||
port->setCapacitanceLimit(value, min_max);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include "DisallowCopyAssign.hh"
|
||||
#include "Vector.hh"
|
||||
#include "Map.hh"
|
||||
|
|
@ -444,6 +446,7 @@ protected:
|
|||
const char *port_name);
|
||||
float defaultCap(LibertyPort *port);
|
||||
virtual void visitVariable(LibertyVariable *var);
|
||||
void visitPorts(std::function<void (LibertyPort *port)> func);
|
||||
const char *getAttrString(LibertyAttr *attr);
|
||||
void getAttrInt(LibertyAttr *attr,
|
||||
// Return values.
|
||||
|
|
|
|||
Loading…
Reference in New Issue