merge ConcreteElmore into ConcretePiElmore
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
36fce30a30
commit
3b2c6e1df6
|
|
@ -144,44 +144,6 @@ ConcreteParasitic::nodeIterator()
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
ConcreteElmore::ConcreteElmore() :
|
|
||||||
loads_(nullptr)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ConcreteElmore::~ConcreteElmore()
|
|
||||||
{
|
|
||||||
delete loads_;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ConcreteElmore::findElmore(const Pin *load_pin,
|
|
||||||
float &elmore,
|
|
||||||
bool &exists) const
|
|
||||||
{
|
|
||||||
if (loads_)
|
|
||||||
loads_->findKey(load_pin, elmore, exists);
|
|
||||||
else
|
|
||||||
exists = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ConcreteElmore::deleteLoad(const Pin *load_pin)
|
|
||||||
{
|
|
||||||
loads_->erase(load_pin);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ConcreteElmore::setElmore(const Pin *load_pin,
|
|
||||||
float elmore)
|
|
||||||
{
|
|
||||||
if (loads_ == nullptr)
|
|
||||||
loads_ = new ConcreteElmoreLoadMap;
|
|
||||||
(*loads_)[load_pin] = elmore;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
ConcretePi::ConcretePi(float c2,
|
ConcretePi::ConcretePi(float c2,
|
||||||
float rpi,
|
float rpi,
|
||||||
float c1) :
|
float c1) :
|
||||||
|
|
@ -230,10 +192,15 @@ ConcretePiElmore::ConcretePiElmore(float c2,
|
||||||
float rpi,
|
float rpi,
|
||||||
float c1) :
|
float c1) :
|
||||||
ConcretePi(c2, rpi, c1),
|
ConcretePi(c2, rpi, c1),
|
||||||
ConcreteElmore()
|
loads_(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ConcretePiElmore::~ConcretePiElmore()
|
||||||
|
{
|
||||||
|
delete loads_;
|
||||||
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
ConcretePiElmore::capacitance() const
|
ConcretePiElmore::capacitance() const
|
||||||
{
|
{
|
||||||
|
|
@ -273,14 +240,25 @@ ConcretePiElmore::findElmore(const Pin *load_pin,
|
||||||
float &elmore,
|
float &elmore,
|
||||||
bool &exists) const
|
bool &exists) const
|
||||||
{
|
{
|
||||||
ConcreteElmore::findElmore(load_pin, elmore, exists);
|
if (loads_)
|
||||||
|
loads_->findKey(load_pin, elmore, exists);
|
||||||
|
else
|
||||||
|
exists = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ConcretePiElmore::setElmore(const Pin *load_pin,
|
ConcretePiElmore::setElmore(const Pin *load_pin,
|
||||||
float elmore)
|
float elmore)
|
||||||
{
|
{
|
||||||
ConcreteElmore::setElmore(load_pin, elmore);
|
if (loads_ == nullptr)
|
||||||
|
loads_ = new ConcreteElmoreLoadMap;
|
||||||
|
(*loads_)[load_pin] = elmore;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ConcretePiElmore::deleteLoad(const Pin *load_pin)
|
||||||
|
{
|
||||||
|
loads_->erase(load_pin);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -82,24 +82,6 @@ public:
|
||||||
virtual ParasiticNodeIterator *nodeIterator();
|
virtual ParasiticNodeIterator *nodeIterator();
|
||||||
};
|
};
|
||||||
|
|
||||||
class ConcreteElmore
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
void findElmore(const Pin *load_pin,
|
|
||||||
float &elmore,
|
|
||||||
bool &exists) const;
|
|
||||||
void deleteLoad(const Pin *load_pin);
|
|
||||||
void setElmore(const Pin *load_pin,
|
|
||||||
float elmore);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
ConcreteElmore();
|
|
||||||
virtual ~ConcreteElmore();
|
|
||||||
|
|
||||||
private:
|
|
||||||
ConcreteElmoreLoadMap *loads_;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Pi model for a driver pin.
|
// Pi model for a driver pin.
|
||||||
class ConcretePi
|
class ConcretePi
|
||||||
{
|
{
|
||||||
|
|
@ -126,13 +108,13 @@ protected:
|
||||||
|
|
||||||
// Pi model for a driver pin and the elmore delay to each load.
|
// Pi model for a driver pin and the elmore delay to each load.
|
||||||
class ConcretePiElmore : public ConcretePi,
|
class ConcretePiElmore : public ConcretePi,
|
||||||
public ConcreteElmore,
|
|
||||||
public ConcreteParasitic
|
public ConcreteParasitic
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ConcretePiElmore(float c2,
|
ConcretePiElmore(float c2,
|
||||||
float rpi,
|
float rpi,
|
||||||
float c1);
|
float c1);
|
||||||
|
virtual ~ConcretePiElmore();
|
||||||
virtual bool isPiElmore() const { return true; }
|
virtual bool isPiElmore() const { return true; }
|
||||||
virtual bool isPiModel() const { return true; }
|
virtual bool isPiModel() const { return true; }
|
||||||
virtual float capacitance() const;
|
virtual float capacitance() const;
|
||||||
|
|
@ -143,6 +125,10 @@ public:
|
||||||
virtual void findElmore(const Pin *load_pin, float &elmore,
|
virtual void findElmore(const Pin *load_pin, float &elmore,
|
||||||
bool &exists) const;
|
bool &exists) const;
|
||||||
virtual void setElmore(const Pin *load_pin, float elmore);
|
virtual void setElmore(const Pin *load_pin, float elmore);
|
||||||
|
void deleteLoad(const Pin *load_pin);
|
||||||
|
|
||||||
|
private:
|
||||||
|
ConcreteElmoreLoadMap *loads_;
|
||||||
};
|
};
|
||||||
|
|
||||||
// PiElmore from wireload model estimate.
|
// PiElmore from wireload model estimate.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue