ClkNetwork::pins(clock)
This commit is contained in:
parent
b36d2753d1
commit
990cf46959
|
|
@ -39,9 +39,11 @@ public:
|
||||||
void ensureClkNetwork();
|
void ensureClkNetwork();
|
||||||
void clear();
|
void clear();
|
||||||
bool isClock(const Pin *pin) const;
|
bool isClock(const Pin *pin) const;
|
||||||
|
bool isClock(const Net *net) const;
|
||||||
bool isIdealClock(const Pin *pin) const;
|
bool isIdealClock(const Pin *pin) const;
|
||||||
const ClockSet *clocks(const Pin *pin);
|
const ClockSet *clocks(const Pin *pin);
|
||||||
const ClockSet *idealClocks(const Pin *pin);
|
const ClockSet *idealClocks(const Pin *pin);
|
||||||
|
const PinSet *pins(const Clock *clk);
|
||||||
void clkPinsInvalid();
|
void clkPinsInvalid();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
|
|
@ -1146,11 +1146,12 @@ public:
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void ensureClkNetwork();
|
void ensureClkNetwork();
|
||||||
// Assumes ensureClkNetwork() has been called.
|
|
||||||
bool isClock(Pin *pin) const;
|
|
||||||
// Assumes ensureClkNetwork() has been called.
|
|
||||||
bool isIdealClock(Pin *pin) const;
|
|
||||||
void clkPinsInvalid();
|
void clkPinsInvalid();
|
||||||
|
// The following functions assume ensureClkNetwork() has been called.
|
||||||
|
bool isClock(const Pin *pin) const;
|
||||||
|
bool isClock(const Net *net) const;
|
||||||
|
bool isIdealClock(const Pin *pin) const;
|
||||||
|
const PinSet *pins(const Clock *clk);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,22 @@ ClkNetwork::isClock(const Pin *pin) const
|
||||||
return pin_clks_map_.hasKey(pin);
|
return pin_clks_map_.hasKey(pin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
ClkNetwork::isClock(const Net *net) const
|
||||||
|
{
|
||||||
|
bool is_clk = false;
|
||||||
|
NetConnectedPinIterator *pin_iter = network_->pinIterator(net);
|
||||||
|
while (pin_iter->hasNext()) {
|
||||||
|
Pin *pin = pin_iter->next();
|
||||||
|
if (isClock(pin)) {
|
||||||
|
is_clk = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete pin_iter;
|
||||||
|
return is_clk;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ClkNetwork::isIdealClock(const Pin *pin) const
|
ClkNetwork::isIdealClock(const Pin *pin) const
|
||||||
{
|
{
|
||||||
|
|
@ -170,4 +186,13 @@ ClkNetwork::idealClocks(const Pin *pin)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const PinSet *
|
||||||
|
ClkNetwork::pins(const Clock *clk)
|
||||||
|
{
|
||||||
|
if (clk_pins_map_.hasKey(clk))
|
||||||
|
return &clk_pins_map_[clk];
|
||||||
|
else
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
||||||
|
|
@ -5272,17 +5272,29 @@ Sta::ensureClkNetwork()
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Sta::isClock(Pin *pin) const
|
Sta::isClock(const Pin *pin) const
|
||||||
{
|
{
|
||||||
return clk_network_->isClock(pin);
|
return clk_network_->isClock(pin);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Sta::isIdealClock(Pin *pin) const
|
Sta::isClock(const Net *net) const
|
||||||
|
{
|
||||||
|
return clk_network_->isClock(net);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
Sta::isIdealClock(const Pin *pin) const
|
||||||
{
|
{
|
||||||
return clk_network_->isIdealClock(pin);
|
return clk_network_->isIdealClock(pin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const PinSet *
|
||||||
|
Sta::pins(const Clock *clk)
|
||||||
|
{
|
||||||
|
return clk_network_->pins(clk);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Sta::clkPinsInvalid()
|
Sta::clkPinsInvalid()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue