Skip to content

Commit

Permalink
vhdlpp: Changed the workaround for accessing localparam arrays & reco…
Browse files Browse the repository at this point in the history
…rds.
  • Loading branch information
msuminsk committed Mar 7, 2015
1 parent 295e4e7 commit d1dc98b
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions vhdlpp/expression_emit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -854,22 +854,15 @@ int ExpName::emit_workaround_(ostream&out, Entity*ent, ScopeBase*scope,
{
int errors = 0;

out << "{";
for(int i = field_size - 1; i >= 0; --i) {
if(i != field_size - 1)
out << ",";
out << "\\" << (prefix_.get() ? prefix_->name_ : name_) << " [";

out << "\\" << (prefix_.get() ? prefix_->name_ : name_) << " [";

for(list<index_t*>::const_iterator it = indices.begin();
it != indices.end(); ++it) {
errors += (*it)->emit(out, ent, scope);
out << " + ";
}

out << i << "]";
for(list<index_t*>::const_iterator it = indices.begin();
it != indices.end(); ++it) {
errors += (*it)->emit(out, ent, scope);
out << "+";
}
out << "}";

out << ":" << field_size << "]";

return errors;
}
Expand Down

0 comments on commit d1dc98b

Please sign in to comment.