vhdlpp: 'string' type is emitted as 'string' instead of 'array <> of character'.

This commit is contained in:
Maciej Suminski 2015-03-06 16:58:22 +01:00
parent 099bb427bc
commit d3229b9068
1 changed files with 5 additions and 1 deletions

View File

@ -38,13 +38,17 @@ void VType::write_type_to_stream(ostream&fd) const
void VTypeArray::write_to_stream(ostream&fd) const
{
// Special case: std_logic_vector
// Special cases: std_logic_vector & string
if (etype_ == &primitive_STDLOGIC) {
fd << "std_logic_vector";
if (! ranges_.empty() && ! ranges_[0].is_box()) {
write_range_to_stream_(fd);
}
return;
} else if (etype_ == &primitive_CHARACTER &&
ranges_.size() == 1 && ranges_[0].is_box()) {
fd << "string";
return;
}
bool typedefed = false;