3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

portarcs: New command to derive propagation arcs

This commit is contained in:
Martin Povišer 2024-11-13 16:20:05 +01:00
parent 4ce8c7a0d3
commit 2dba345049
3 changed files with 319 additions and 0 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
{