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

fixup! WIP add placeholder $connect cell

This commit is contained in:
Jannis Harder 2025-08-14 16:15:28 +02:00
parent b394629e3f
commit 727dabba95
2 changed files with 16 additions and 0 deletions

View file

@ -5477,6 +5477,21 @@ bool RTLIL::SigSpec::has_const() const
return false;
}
bool RTLIL::SigSpec::has_const(RTLIL::State state) const
{
cover("kernel.rtlil.sigspec.has_const");
pack();
for (auto it = chunks_.begin(); it != chunks_.end(); it++)
if (it->width > 0 && it->wire == NULL) {
for (size_t i = 0; i < it->data.size(); i++)
if (it->data[i] == state)
return true;
}
return false;
}
bool RTLIL::SigSpec::has_marked_bits() const
{
cover("kernel.rtlil.sigspec.has_marked_bits");

View file

@ -1155,6 +1155,7 @@ public:
bool is_fully_def() const;
bool is_fully_undef() const;
bool has_const() const;
bool has_const(RTLIL::State state) const;
bool has_marked_bits() const;
bool is_onehot(int *pos = nullptr) const;