aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rtlil.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r--kernel/rtlil.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index 7638d4689..1d1448d45 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -1551,6 +1551,15 @@ std::vector<RTLIL::SigBit> RTLIL::SigSpec::to_sigbit_vector() const
return sigbits;
}
+RTLIL::SigBit RTLIL::SigSpec::to_single_sigbit() const
+{
+ log_assert(width == 1);
+ for (auto &c : chunks)
+ if (c.width)
+ return RTLIL::SigBit(c);
+ log_abort();
+}
+
static void sigspec_parse_split(std::vector<std::string> &tokens, const std::string &text, char sep)
{
size_t start = 0, end = 0;