summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-07-24 22:47:57 +0200
committerClifford Wolf <clifford@clifford.at>2014-07-24 23:10:58 +0200
commit6aa792c864444324a1b140c2b63bd860f0cc3914 (patch)
tree07b2bf3003864337df616a21374c046ddc352c62 /frontends
parent7a608437c65e9646ed229055d61b310e7d93e37e (diff)
Replaced more old SigChunk programming patterns
Diffstat (limited to 'frontends')
-rw-r--r--frontends/ast/genrtlil.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc
index 3d848e82..e74f36ab 100644
--- a/frontends/ast/genrtlil.cc
+++ b/frontends/ast/genrtlil.cc
@@ -294,9 +294,9 @@ struct AST_INTERNAL::ProcessGenerator
assert(init_lvalue.size() == init_rvalue.size());
int offset = 0;
- for (size_t i = 0; i < init_lvalue.chunks().size(); i++) {
- RTLIL::SigSpec lhs = init_lvalue.chunks()[i];
- RTLIL::SigSpec rhs = init_rvalue.extract(offset, init_lvalue.chunks()[i].width);
+ for (auto &init_lvalue_c : init_lvalue.chunks()) {
+ RTLIL::SigSpec lhs = init_lvalue_c;
+ RTLIL::SigSpec rhs = init_rvalue.extract(offset, init_lvalue_c.width);
sync->actions.push_back(RTLIL::SigSig(lhs, rhs));
offset += lhs.size();
}
@@ -398,10 +398,10 @@ struct AST_INTERNAL::ProcessGenerator
assert(lvalue.size() == rvalue.size());
int offset = 0;
- for (size_t i = 0; i < lvalue.chunks().size(); i++) {
- RTLIL::SigSpec lhs = lvalue.chunks()[i];
- RTLIL::SigSpec rhs = rvalue.extract(offset, lvalue.chunks()[i].width);
- if (inSyncRule && lvalue.chunks()[i].wire && lvalue.chunks()[i].wire->get_bool_attribute("\\nosync"))
+ for (auto &lvalue_c : lvalue.chunks()) {
+ RTLIL::SigSpec lhs = lvalue_c;
+ RTLIL::SigSpec rhs = rvalue.extract(offset, lvalue_c.width);
+ if (inSyncRule && lvalue_c.wire && lvalue_c.wire->get_bool_attribute("\\nosync"))
rhs = RTLIL::SigSpec(RTLIL::State::Sx, rhs.size());
actions.push_back(RTLIL::SigSig(lhs, rhs));
offset += lhs.size();