mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-24 06:43:41 +00:00
Added RTLIL::SigSpec::to_single_sigbit()
This commit is contained in:
parent
67b0ce2578
commit
f9c4d33909
2 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue