mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-03 13:07:58 +00:00
Make SigSpec::updhash() use chunk iterator
This commit is contained in:
parent
37e4c2e8f8
commit
fd7b4f4a8b
1 changed files with 5 additions and 9 deletions
|
|
@ -4736,10 +4736,9 @@ void RTLIL::SigSpec::updhash() const
|
|||
return;
|
||||
|
||||
cover("kernel.rtlil.sigspec.hash");
|
||||
that->pack();
|
||||
|
||||
Hasher h;
|
||||
for (auto &c : that->chunks_)
|
||||
for (auto &c : that->chunks())
|
||||
if (c.wire == NULL) {
|
||||
for (auto &v : c.data)
|
||||
h.eat(v);
|
||||
|
|
@ -5193,13 +5192,8 @@ void RTLIL::SigSpec::append(const RTLIL::SigSpec &signal)
|
|||
|
||||
cover("kernel.rtlil.sigspec.append");
|
||||
|
||||
if (packed() != signal.packed()) {
|
||||
pack();
|
||||
signal.pack();
|
||||
}
|
||||
|
||||
if (packed())
|
||||
for (auto &other_c : signal.chunks_)
|
||||
for (auto &other_c : signal.chunks())
|
||||
{
|
||||
auto &my_last_c = chunks_.back();
|
||||
if (my_last_c.wire == NULL && other_c.wire == NULL) {
|
||||
|
|
@ -5213,8 +5207,10 @@ void RTLIL::SigSpec::append(const RTLIL::SigSpec &signal)
|
|||
} else
|
||||
chunks_.push_back(other_c);
|
||||
}
|
||||
else
|
||||
else {
|
||||
signal.unpack();
|
||||
bits_.insert(bits_.end(), signal.bits_.begin(), signal.bits_.end());
|
||||
}
|
||||
|
||||
width_ += signal.width_;
|
||||
check();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue