From c681c17038acb5f60d5abcf58f20d6a8d2bdffef Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 8 Jun 2013 09:34:36 +0200 Subject: Improved auto-detection of -show signals in sat_solve --- kernel/sigtools.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'kernel') diff --git a/kernel/sigtools.h b/kernel/sigtools.h index f081957c7..69d6cd72d 100644 --- a/kernel/sigtools.h +++ b/kernel/sigtools.h @@ -139,6 +139,30 @@ struct SigPool } return true; } + + RTLIL::SigSpec export_one() + { + RTLIL::SigSpec sig; + for (auto &bit : bits) { + sig.append(RTLIL::SigSpec(bit.first, 1, bit.second)); + break; + } + return sig; + } + + RTLIL::SigSpec export_all() + { + RTLIL::SigSpec sig; + for (auto &bit : bits) + sig.append(RTLIL::SigSpec(bit.first, 1, bit.second)); + sig.sort_and_unify(); + return sig; + } + + size_t size() + { + return bits.size(); + } }; template -- cgit v1.2.3