mirror of
https://github.com/The-OpenROAD-Project/OpenSTA.git
synced 2026-05-30 00:24:12 +08:00
latest STA plus changes to fix prima dcalc and read_spef issues, TCL regression added
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
This commit is contained in:
@@ -35,7 +35,7 @@ PortDirection *PortDirection::bidirect_;
|
||||
PortDirection *PortDirection::internal_;
|
||||
PortDirection *PortDirection::ground_;
|
||||
PortDirection *PortDirection::power_;
|
||||
PortDirection *PortDirection::bias_;
|
||||
PortDirection *PortDirection::well_;
|
||||
PortDirection *PortDirection::unknown_;
|
||||
|
||||
void
|
||||
@@ -48,7 +48,7 @@ PortDirection::init()
|
||||
internal_ = new PortDirection("internal", 4);
|
||||
ground_ = new PortDirection("ground", 5);
|
||||
power_ = new PortDirection("power", 6);
|
||||
bias_ = new PortDirection("bias", 7);
|
||||
well_ = new PortDirection("well", 7);
|
||||
unknown_ = new PortDirection("unknown", 8);
|
||||
}
|
||||
|
||||
@@ -69,8 +69,8 @@ PortDirection::destroy()
|
||||
ground_ = nullptr;
|
||||
delete power_;
|
||||
power_ = nullptr;
|
||||
delete bias_;
|
||||
bias_ = nullptr;
|
||||
delete well_;
|
||||
well_ = nullptr;
|
||||
delete unknown_;
|
||||
unknown_ = nullptr;
|
||||
}
|
||||
@@ -99,8 +99,8 @@ PortDirection::find(const char *dir_name)
|
||||
return ground_;
|
||||
else if (stringEqual(dir_name, "power"))
|
||||
return power_;
|
||||
else if (stringEqual(dir_name, "bias"))
|
||||
return bias_;
|
||||
else if (stringEqual(dir_name, "well"))
|
||||
return well_;
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
@@ -130,7 +130,9 @@ PortDirection::isAnyTristate() const
|
||||
bool
|
||||
PortDirection::isPowerGround() const
|
||||
{
|
||||
return this == ground_ || this == power_ || this == bias_;
|
||||
return this == ground_
|
||||
|| this == power_
|
||||
|| this == well_;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -161,13 +161,13 @@ TEST_F(PortDirectionTest, PowerSingleton) {
|
||||
EXPECT_TRUE(dir->isPower());
|
||||
}
|
||||
|
||||
TEST_F(PortDirectionTest, BiasSingleton)
|
||||
TEST_F(PortDirectionTest, WellSingleton)
|
||||
{
|
||||
PortDirection *dir = PortDirection::bias();
|
||||
PortDirection *dir = PortDirection::well();
|
||||
EXPECT_NE(dir, nullptr);
|
||||
EXPECT_EQ(dir->name(), "bias");
|
||||
EXPECT_EQ(dir->name(), "well");
|
||||
EXPECT_EQ(dir->index(), 7);
|
||||
EXPECT_TRUE(dir->isBias());
|
||||
EXPECT_TRUE(dir->isWell());
|
||||
}
|
||||
|
||||
TEST_F(PortDirectionTest, UnknownSingleton) {
|
||||
@@ -186,7 +186,7 @@ TEST_F(PortDirectionTest, FindByName) {
|
||||
EXPECT_EQ(PortDirection::find("internal"), PortDirection::internal());
|
||||
EXPECT_EQ(PortDirection::find("ground"), PortDirection::ground());
|
||||
EXPECT_EQ(PortDirection::find("power"), PortDirection::power());
|
||||
EXPECT_EQ(PortDirection::find("bias"), PortDirection::bias());
|
||||
EXPECT_EQ(PortDirection::find("well"), PortDirection::well());
|
||||
EXPECT_EQ(PortDirection::find("nonexistent"), nullptr);
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ TEST_F(PortDirectionTest, IsAnyInput) {
|
||||
EXPECT_FALSE(PortDirection::internal()->isAnyInput());
|
||||
EXPECT_FALSE(PortDirection::ground()->isAnyInput());
|
||||
EXPECT_FALSE(PortDirection::power()->isAnyInput());
|
||||
EXPECT_FALSE(PortDirection::bias()->isAnyInput());
|
||||
EXPECT_FALSE(PortDirection::well()->isAnyInput());
|
||||
EXPECT_FALSE(PortDirection::unknown()->isAnyInput());
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ TEST_F(PortDirectionTest, IsAnyOutput) {
|
||||
EXPECT_FALSE(PortDirection::internal()->isAnyOutput());
|
||||
EXPECT_FALSE(PortDirection::ground()->isAnyOutput());
|
||||
EXPECT_FALSE(PortDirection::power()->isAnyOutput());
|
||||
EXPECT_FALSE(PortDirection::bias()->isAnyOutput());
|
||||
EXPECT_FALSE(PortDirection::well()->isAnyOutput());
|
||||
EXPECT_FALSE(PortDirection::unknown()->isAnyOutput());
|
||||
}
|
||||
|
||||
@@ -222,14 +222,14 @@ TEST_F(PortDirectionTest, IsAnyTristate) {
|
||||
EXPECT_FALSE(PortDirection::internal()->isAnyTristate());
|
||||
EXPECT_FALSE(PortDirection::ground()->isAnyTristate());
|
||||
EXPECT_FALSE(PortDirection::power()->isAnyTristate());
|
||||
EXPECT_FALSE(PortDirection::bias()->isAnyTristate());
|
||||
EXPECT_FALSE(PortDirection::well()->isAnyTristate());
|
||||
EXPECT_FALSE(PortDirection::unknown()->isAnyTristate());
|
||||
}
|
||||
|
||||
TEST_F(PortDirectionTest, IsPowerGround) {
|
||||
EXPECT_TRUE(PortDirection::power()->isPowerGround());
|
||||
EXPECT_TRUE(PortDirection::ground()->isPowerGround());
|
||||
EXPECT_TRUE(PortDirection::bias()->isPowerGround());
|
||||
EXPECT_TRUE(PortDirection::well()->isPowerGround());
|
||||
EXPECT_FALSE(PortDirection::input()->isPowerGround());
|
||||
EXPECT_FALSE(PortDirection::output()->isPowerGround());
|
||||
EXPECT_FALSE(PortDirection::tristate()->isPowerGround());
|
||||
@@ -865,7 +865,7 @@ TEST(PortDirectionExtraTest, AllDirections) {
|
||||
EXPECT_NE(PortDirection::internal(), nullptr);
|
||||
EXPECT_NE(PortDirection::ground(), nullptr);
|
||||
EXPECT_NE(PortDirection::power(), nullptr);
|
||||
EXPECT_NE(PortDirection::bias(), nullptr);
|
||||
EXPECT_NE(PortDirection::well(), nullptr);
|
||||
EXPECT_NE(PortDirection::unknown(), nullptr);
|
||||
}
|
||||
|
||||
@@ -888,7 +888,7 @@ TEST(PortDirectionExtraTest, DirectionProperties) {
|
||||
|
||||
EXPECT_TRUE(PortDirection::ground()->isPowerGround());
|
||||
EXPECT_TRUE(PortDirection::power()->isPowerGround());
|
||||
EXPECT_TRUE(PortDirection::bias()->isPowerGround());
|
||||
EXPECT_TRUE(PortDirection::well()->isPowerGround());
|
||||
}
|
||||
|
||||
TEST(PortDirectionExtraTest, DirectionNames) {
|
||||
@@ -902,7 +902,7 @@ TEST(PortDirectionExtraTest, DirectionNames) {
|
||||
EXPECT_EQ(PortDirection::internal()->name(), "internal");
|
||||
EXPECT_EQ(PortDirection::ground()->name(), "ground");
|
||||
EXPECT_EQ(PortDirection::power()->name(), "power");
|
||||
EXPECT_EQ(PortDirection::bias()->name(), "bias");
|
||||
EXPECT_EQ(PortDirection::well()->name(), "well");
|
||||
EXPECT_EQ(PortDirection::unknown()->name(), "unknown");
|
||||
}
|
||||
|
||||
@@ -917,7 +917,7 @@ TEST(PortDirectionExtraTest, FindAllByName) {
|
||||
EXPECT_EQ(PortDirection::find("internal"), PortDirection::internal());
|
||||
EXPECT_EQ(PortDirection::find("ground"), PortDirection::ground());
|
||||
EXPECT_EQ(PortDirection::find("power"), PortDirection::power());
|
||||
EXPECT_EQ(PortDirection::find("bias"), PortDirection::bias());
|
||||
EXPECT_EQ(PortDirection::find("well"), PortDirection::well());
|
||||
// "unknown" is not findable by name, returns nullptr
|
||||
EXPECT_EQ(PortDirection::find("nonexistent"), nullptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user