3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-03 13:07:58 +00:00

Simplify SigSpec::as_bit()

This commit is contained in:
Robert O'Callahan 2025-10-30 11:34:42 +00:00
parent be530bef73
commit d314c47a55

View file

@ -5623,12 +5623,7 @@ RTLIL::SigChunk RTLIL::SigSpec::as_chunk() const
RTLIL::SigBit RTLIL::SigSpec::as_bit() const
{
cover("kernel.rtlil.sigspec.as_bit");
log_assert(width_ == 1);
if (packed())
return RTLIL::SigBit(*chunks_.begin());
else
return bits_[0];
return RTLIL::SigBit(*this);
}
bool RTLIL::SigSpec::match(const char* pattern) const