vhdlpp: ExpName::probe_type() checks Subprogram parameters.

This commit is contained in:
Maciej Suminski 2015-06-22 14:03:59 +02:00
parent 95044d9ac7
commit 5858e1bbac
3 changed files with 11 additions and 1 deletions

View File

@ -940,6 +940,10 @@ const VType* ExpName::probe_type(Entity*ent, ScopeBase*scope) const
return type;
}
if (const InterfacePort*port = scope->find_param(name_)) {
return port->type;
}
if ((type = scope->is_enum_name(name_))) {
return type;
}

View File

@ -158,7 +158,12 @@ Variable* ScopeBase::find_variable(perm_string by_name) const
}
}
const InterfacePort* ScopeBase::find_param(perm_string by_name) const
const InterfacePort* ScopeBase::find_param(perm_string) const
{
return NULL;
}
const InterfacePort* ScopeBase::find_param_all(perm_string by_name) const
{
for(map<perm_string,SubprogramHeader*>::const_iterator it = use_subprograms_.begin();
it != use_subprograms_.end(); ++it) {

View File

@ -57,6 +57,7 @@ class ScopeBase {
Signal* find_signal(perm_string by_name) const;
Variable* find_variable(perm_string by_name) const;
virtual const InterfacePort* find_param(perm_string by_name) const;
const InterfacePort* find_param_all(perm_string by_name) const;
SubprogramHeader* find_subprogram(perm_string by_name) const;
// Checks if a string is one of possible enum values. If so, the enum
// type is returned, otherwise NULL.