tcl sta::is_ideal_clock

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2026-03-02 16:26:14 -08:00
parent e054499e45
commit f89fcbfa11
3 changed files with 22 additions and 8 deletions

View File

@ -1297,13 +1297,13 @@ public:
void clkPinsInvalid(const Mode *mode);
// The following functions assume ensureClkNetwork() has been called.
bool isClock(const Pin *pin,
const Mode *mode) const;
const Mode *mode);
bool isClock(const Net *net,
const Mode *mode) const;
const Mode *mode);
bool isIdealClock(const Pin *pin,
const Mode *mode) const;
const Mode *mode);
bool isPropagatedClock(const Pin *pin,
const Mode *mode) const;
const Mode *mode);
const PinSet *pins(const Clock *clk,
const Mode *mode);

View File

@ -335,6 +335,15 @@ slow_drivers(int count)
return Sta::sta()->slowDrivers(count);
}
bool
is_ideal_clock(const Pin *pin)
{
Sta *sta = Sta::sta();
const Mode *mode = sta->cmdMode();
sta->ensureClkNetwork();
return sta->isIdealClock(pin, mode);
}
////////////////////////////////////////////////////////////////
PathEndSeq

View File

@ -6054,28 +6054,31 @@ Sta::ensureClkNetwork(const Mode *mode)
bool
Sta::isClock(const Pin *pin,
const Mode *mode) const
const Mode *mode)
{
ensureClkNetwork(mode);
return mode->clkNetwork()->isClock(pin);
}
bool
Sta::isClock(const Net *net,
const Mode *mode) const
const Mode *mode)
{
ensureClkNetwork(mode);
return mode->clkNetwork()->isClock(net);
}
bool
Sta::isIdealClock(const Pin *pin,
const Mode *mode) const
const Mode *mode)
{
ensureClkNetwork(mode);
return mode->clkNetwork()->isIdealClock(pin);
}
bool
Sta::isPropagatedClock(const Pin *pin,
const Mode *mode) const
const Mode *mode)
{
return mode->clkNetwork()->isPropagatedClock(pin);
}
@ -6084,12 +6087,14 @@ const PinSet *
Sta::pins(const Clock *clk,
const Mode *mode)
{
ensureClkNetwork(mode);
return mode->clkNetwork()->pins(clk);
}
void
Sta::clkPinsInvalid(const Mode *mode)
{
ensureClkNetwork(mode);
mode->clkNetwork()->clkPinsInvalid();
}