3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-24 01:25:33 +00:00
This commit is contained in:
Akash Levy 2024-11-15 19:02:06 -08:00
commit 6be73e5c2e
12 changed files with 691 additions and 39 deletions

View file

@ -37,6 +37,14 @@ struct TimingInfo
bool operator==(const NameBit& nb) const { return nb.name == name && nb.offset == offset; }
bool operator!=(const NameBit& nb) const { return !operator==(nb); }
unsigned int hash() const { return mkhash_add(name.hash(), offset); }
std::optional<SigBit> get_connection(RTLIL::Cell *cell) {
if (!cell->hasPort(name))
return {};
auto &port = cell->getPort(name);
if (offset >= port.size())
return {};
return port[offset];
}
};
struct BitBit
{