3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-30 21:19:30 +00:00

kernel: Add known_driver method to Wire/SigSpec

This commit is contained in:
Jannis Harder 2025-09-03 15:29:08 +02:00
parent 22423b97c1
commit c4f435569f
2 changed files with 13 additions and 0 deletions

View file

@ -5534,6 +5534,15 @@ bool RTLIL::SigSpec::is_chunk() const
return GetSize(chunks_) == 1;
}
bool RTLIL::SigSpec::known_driver() const
{
pack();
for (auto &chunk : chunks_)
if (chunk.is_wire() && !chunk.wire->known_driver())
return false;
return true;
}
bool RTLIL::SigSpec::is_fully_const() const
{
cover("kernel.rtlil.sigspec.is_fully_const");