3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-05-25 19:36:21 +00:00

bitpattern: add analysis effort limit, use in proc_rmdead

This commit is contained in:
Emil J. Tywoniak 2026-05-04 23:09:21 +02:00
parent a966d06524
commit a3740057e3
4 changed files with 48 additions and 23 deletions

View file

@ -27,6 +27,12 @@ TEST(BitpatternTest, has)
// 01a is not covered by 011
EXPECT_FALSE(BitPatternPool(_011).has_all(_01a));
EXPECT_FALSE(BitPatternPool(_111).has_all(_01a));
// test mutating and analysis effort limits
auto pool = BitPatternPool(3);
pool.limit = 4;
EXPECT_EQ(pool.take(_111), TakeResult::TRUE);
EXPECT_EQ(pool.take(_111), TakeResult::FALSE);
EXPECT_EQ(pool.take(_01a), TakeResult::TOO_BIG);
}
YOSYS_NAMESPACE_END