From e5348817947be85cb69f42c7e0ec0706d0511f0f Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 10 Jun 2015 08:13:56 +0200 Subject: Added "json -aig" --- kernel/cellaigs.cc | 10 ++++++++++ kernel/cellaigs.h | 3 +++ 2 files changed, 13 insertions(+) (limited to 'kernel') diff --git a/kernel/cellaigs.cc b/kernel/cellaigs.cc index 483aa7d57..1d9612e81 100644 --- a/kernel/cellaigs.cc +++ b/kernel/cellaigs.cc @@ -41,6 +41,16 @@ unsigned int AigNode::hash() const return h; } +bool Aig::operator==(const Aig &other) const +{ + return name == other.name; +} + +unsigned int Aig::hash() const +{ + return hash_ops::hash(name); +} + struct AigMaker { Aig *aig; diff --git a/kernel/cellaigs.h b/kernel/cellaigs.h index db635ba90..efe9d83c1 100644 --- a/kernel/cellaigs.h +++ b/kernel/cellaigs.h @@ -41,6 +41,9 @@ struct Aig string name; vector nodes; Aig(Cell *cell); + + bool operator==(const Aig &other) const; + unsigned int hash() const; }; YOSYS_NAMESPACE_END -- cgit v1.2.3