vhdlpp: Changed the workaround for accessing localparam arrays & records.

This commit is contained in:
Maciej Suminski 2015-03-07 20:47:20 +01:00
parent 295e4e7dfb
commit d1dc98b7f7
1 changed files with 7 additions and 14 deletions

View File

@ -854,22 +854,15 @@ int ExpName::emit_workaround_(ostream&out, Entity*ent, ScopeBase*scope,
{ {
int errors = 0; int errors = 0;
out << "{"; out << "\\" << (prefix_.get() ? prefix_->name_ : name_) << " [";
for(int i = field_size - 1; i >= 0; --i) {
if(i != field_size - 1)
out << ",";
out << "\\" << (prefix_.get() ? prefix_->name_ : name_) << " ["; for(list<index_t*>::const_iterator it = indices.begin();
it != indices.end(); ++it) {
for(list<index_t*>::const_iterator it = indices.begin(); errors += (*it)->emit(out, ent, scope);
it != indices.end(); ++it) { out << "+";
errors += (*it)->emit(out, ent, scope);
out << " + ";
}
out << i << "]";
} }
out << "}";
out << ":" << field_size << "]";
return errors; return errors;
} }