aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2020-02-20 07:52:08 -0800
committerEddie Hung <eddie@fpgeh.com>2020-02-27 10:17:29 -0800
commit78929e8c3d399d47a36bb974eed74e53a3840402 (patch)
tree74268208e0b80e82beb0d7cd9596a7528151bf0b
parenta179d918ec4e5ed595e8f556b159ab39679d4e6c (diff)
downloadyosys-78929e8c3d399d47a36bb974eed74e53a3840402.tar.gz
yosys-78929e8c3d399d47a36bb974eed74e53a3840402.tar.bz2
yosys-78929e8c3d399d47a36bb974eed74e53a3840402.zip
Fixes for older compilers
-rw-r--r--kernel/timinginfo.h9
-rw-r--r--passes/techmap/abc9_ops.cc2
2 files changed, 9 insertions, 2 deletions
diff --git a/kernel/timinginfo.h b/kernel/timinginfo.h
index 7855ddd15..5a6f4aa28 100644
--- a/kernel/timinginfo.h
+++ b/kernel/timinginfo.h
@@ -38,7 +38,14 @@ struct TimingInfo
bool operator!=(const NameBit& nb) const { return !operator==(nb); }
unsigned int hash() const { return mkhash_add(name.hash(), offset); }
};
- typedef std::pair<NameBit,NameBit> BitBit;
+ struct BitBit
+ {
+ NameBit first, second;
+ BitBit(const NameBit &first, const NameBit &second) : first(first), second(second) {}
+ BitBit(const SigBit &first, const SigBit &second) : first(first), second(second) {}
+ bool operator==(const BitBit& bb) const { return bb.first == first && bb.second == second; }
+ unsigned int hash() const { return mkhash_add(first.hash(), second.hash()); }
+ };
struct ModuleTiming
{
diff --git a/passes/techmap/abc9_ops.cc b/passes/techmap/abc9_ops.cc
index cffcc189e..b0bd81698 100644
--- a/passes/techmap/abc9_ops.cc
+++ b/passes/techmap/abc9_ops.cc
@@ -680,7 +680,7 @@ void prep_box(RTLIL::Design *design, bool dff_mode)
first = false;
else
ss << " ";
- auto jt = t.find(std::make_pair(TimingInfo::NameBit(i),TimingInfo::NameBit(o)));
+ auto jt = t.find(TimingInfo::BitBit(i,o));
if (jt == t.end())
ss << "-";
else