summaryrefslogtreecommitdiff
path: root/frontends/ilang
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-07-22 20:15:14 +0200
committerClifford Wolf <clifford@clifford.at>2014-07-22 20:39:37 +0200
commit4b4048bc5feba1ab05c7a63f12c0a17879cb7e04 (patch)
tree27801c4b0171a2491ff6817ebb6d2a1d1484c086 /frontends/ilang
parent16e5ae0b92ac4b7568cb11a769e612e152c0042e (diff)
SigSpec refactoring: using the accessor functions everywhere
Diffstat (limited to 'frontends/ilang')
-rw-r--r--frontends/ilang/parser.y28
1 files changed, 14 insertions, 14 deletions
diff --git a/frontends/ilang/parser.y b/frontends/ilang/parser.y
index e6d3d4c5..e8af447b 100644
--- a/frontends/ilang/parser.y
+++ b/frontends/ilang/parser.y
@@ -363,8 +363,8 @@ sigspec:
chunk.offset = 0;
chunk.data = *$1;
$$ = new RTLIL::SigSpec;
- $$->__chunks.push_back(chunk);
- $$->__width = chunk.width;
+ $$->chunks().push_back(chunk);
+ $$->size() = chunk.width;
delete $1;
} |
TOK_ID {
@@ -375,8 +375,8 @@ sigspec:
chunk.width = current_module->wires[$1]->width;
chunk.offset = 0;
$$ = new RTLIL::SigSpec;
- $$->__chunks.push_back(chunk);
- $$->__width = chunk.width;
+ $$->chunks().push_back(chunk);
+ $$->size() = chunk.width;
free($1);
} |
TOK_ID '[' TOK_INT ']' {
@@ -387,8 +387,8 @@ sigspec:
chunk.offset = $3;
chunk.width = 1;
$$ = new RTLIL::SigSpec;
- $$->__chunks.push_back(chunk);
- $$->__width = 1;
+ $$->chunks().push_back(chunk);
+ $$->size() = 1;
free($1);
} |
TOK_ID '[' TOK_INT ':' TOK_INT ']' {
@@ -399,8 +399,8 @@ sigspec:
chunk.width = $3 - $5 + 1;
chunk.offset = $5;
$$ = new RTLIL::SigSpec;
- $$->__chunks.push_back(chunk);
- $$->__width = chunk.width;
+ $$->chunks().push_back(chunk);
+ $$->size() = chunk.width;
free($1);
} |
'{' sigspec_list '}' {
@@ -410,13 +410,13 @@ sigspec:
sigspec_list:
sigspec_list sigspec {
$$ = new RTLIL::SigSpec;
- for (auto it = $2->__chunks.begin(); it != $2->__chunks.end(); it++) {
- $$->__chunks.push_back(*it);
- $$->__width += it->width;
+ for (auto it = $2->chunks().begin(); it != $2->chunks().end(); it++) {
+ $$->chunks().push_back(*it);
+ $$->size() += it->width;
}
- for (auto it = $1->__chunks.begin(); it != $1->__chunks.end(); it++) {
- $$->__chunks.push_back(*it);
- $$->__width += it->width;
+ for (auto it = $1->chunks().begin(); it != $1->chunks().end(); it++) {
+ $$->chunks().push_back(*it);
+ $$->size() += it->width;
}
delete $1;
delete $2;