3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-29 03:45:52 +00:00

hashlib: redo interface for flexibility

This commit is contained in:
Emil J. Tywoniak 2024-10-01 15:12:03 +02:00
parent 0ab9fccbf1
commit 68e40d8563
36 changed files with 461 additions and 357 deletions

View file

@ -148,6 +148,7 @@ struct OptMergeWorker
for (auto it : hash_conn_strings)
hash_string += it;
log("hashed string %s\n", hash_string.c_str());
return std::hash<std::string>{}(hash_string);
}
@ -276,6 +277,7 @@ struct OptMergeWorker
continue;
uint64_t hash = hash_cell_parameters_and_connections(cell);
log("cell %s: hash %lX\n", cell->name.c_str(), hash);
auto r = sharemap.insert(std::make_pair(hash, cell));
if (!r.second) {
if (compare_cell_parameters_and_connections(cell, r.first->second)) {