diff options
author | Andrew Zonenberg <azonenberg@drawersteak.com> | 2017-01-01 14:08:16 -0800 |
---|---|---|
committer | Andrew Zonenberg <azonenberg@drawersteak.com> | 2017-01-01 14:08:16 -0800 |
commit | babd8dc5b1790533f4f6674724524223c7ae48f4 (patch) | |
tree | 37232bcd10a4d9c7a480c5ed25dc4b588132f441 /kernel | |
parent | 27a626ce9851f4f5832892d5bd6d60258af03ada (diff) | |
parent | f0df7dd7961128824baa785a6f76462f36877e4d (diff) | |
download | yosys-babd8dc5b1790533f4f6674724524223c7ae48f4.tar.gz yosys-babd8dc5b1790533f4f6674724524223c7ae48f4.tar.bz2 yosys-babd8dc5b1790533f4f6674724524223c7ae48f4.zip |
Merge https://github.com/cliffordwolf/yosys
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rtlil.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 7693e3052..40ad8ca13 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -2766,10 +2766,11 @@ void RTLIL::SigSpec::remove2(const RTLIL::SigSpec &pattern, RTLIL::SigSpec *othe other->unpack(); } - for (int i = GetSize(bits_) - 1; i >= 0; i--) { + for (int i = GetSize(bits_) - 1; i >= 0; i--) + { if (bits_[i].wire == NULL) continue; - for (auto &pattern_chunk : pattern.chunks()) { + for (auto &pattern_chunk : pattern.chunks()) if (bits_[i].wire == pattern_chunk.wire && bits_[i].offset >= pattern_chunk.offset && bits_[i].offset < pattern_chunk.offset + pattern_chunk.width) { @@ -2779,8 +2780,8 @@ void RTLIL::SigSpec::remove2(const RTLIL::SigSpec &pattern, RTLIL::SigSpec *othe other->bits_.erase(other->bits_.begin() + i); other->width_--; } + break; } - } } check(); |