mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-21 21:33:40 +00:00
hashlib: redo interface for flexibility
This commit is contained in:
parent
7a362f1f74
commit
d071489ab1
35 changed files with 542 additions and 386 deletions
|
@ -233,10 +233,9 @@ struct ClockgatePass : public Pass {
|
|||
SigBit ce_bit;
|
||||
bool pol_clk;
|
||||
bool pol_ce;
|
||||
unsigned int hash() const {
|
||||
Hasher hash_acc(Hasher h) const {
|
||||
auto t = std::make_tuple(clk_bit, ce_bit, pol_clk, pol_ce);
|
||||
unsigned int h = mkhash_init;
|
||||
h = mkhash(h, hash_ops<decltype(t)>::hash(t));
|
||||
h.acc(t);
|
||||
return h;
|
||||
}
|
||||
bool operator==(const ClkNetInfo& other) const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue