mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-28 19:35:53 +00:00
hashlib: redo interface for flexibility
This commit is contained in:
parent
0ab9fccbf1
commit
68e40d8563
36 changed files with 461 additions and 357 deletions
|
@ -127,11 +127,10 @@ struct proc_dlatch_db_t
|
|||
return signal == other.signal && match == other.match && children == other.children;
|
||||
}
|
||||
|
||||
unsigned int hash() const {
|
||||
unsigned int h = mkhash_init;
|
||||
mkhash(h, signal.hash());
|
||||
mkhash(h, match.hash());
|
||||
for (auto i : children) mkhash(h, i);
|
||||
Hasher hash_acc(Hasher h) const {
|
||||
h.acc(signal);
|
||||
h.acc(match);
|
||||
h.acc(children);
|
||||
return h;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue