ClkInfo::hash resolves #287

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2025-09-16 14:17:30 -07:00
parent 84989688b7
commit 7a41a7f839
1 changed files with 8 additions and 4 deletions

View File

@ -24,6 +24,8 @@
#include "ClkInfo.hh"
#include <functional>
#include "Units.hh"
#include "Network.hh"
#include "Graph.hh"
@ -86,18 +88,20 @@ ClkInfo::findHash(const StaState *sta)
hashIncr(hash_, crpr_clk_path_.vertexId(sta));
hashIncr(hash_, crpr_clk_path_.tag(sta)->hash(false, sta));
}
std::hash<float> hash_float;
if (uncertainties_) {
float uncertainty;
bool exists;
uncertainties_->value(MinMax::min(), uncertainty, exists);
if (exists)
hashIncr(hash_, uncertainty * 1E+12F);
hashIncr(hash_, hash_float(uncertainty));
uncertainties_->value(MinMax::max(), uncertainty, exists);
if (exists)
hashIncr(hash_, uncertainty * 1E+12F);
hashIncr(hash_, hash_float(uncertainty));
}
hashIncr(hash_, latency_ * 1E+12F);
hashIncr(hash_, delayAsFloat(insertion_) * 1E+12F);
hashIncr(hash_, hash_float(latency_));
hashIncr(hash_, hash_float(delayAsFloat(insertion_)));
hashIncr(hash_, is_propagated_);
hashIncr(hash_, is_gen_clk_src_path_);
hashIncr(hash_, is_pulse_clk_);