vhdlpp: Added ScopeBase::find_param() method.
This commit is contained in:
parent
6d75af86e6
commit
621cf37339
|
|
@ -21,6 +21,7 @@
|
|||
# include "scope.h"
|
||||
# include "package.h"
|
||||
# include "subprogram.h"
|
||||
# include "entity.h"
|
||||
# include <algorithm>
|
||||
# include <iostream>
|
||||
# include <iterator>
|
||||
|
|
@ -148,6 +149,23 @@ Variable* ScopeBase::find_variable(perm_string by_name) const
|
|||
}
|
||||
}
|
||||
|
||||
const InterfacePort* ScopeBase::find_param(perm_string by_name) const
|
||||
{
|
||||
for(map<perm_string,Subprogram*>::const_iterator it = use_subprograms_.begin();
|
||||
it != use_subprograms_.end(); ++it) {
|
||||
if(const InterfacePort*port = it->second->find_param(by_name))
|
||||
return port;
|
||||
}
|
||||
|
||||
for(map<perm_string,Subprogram*>::const_iterator it = cur_subprograms_.begin();
|
||||
it != cur_subprograms_.end(); ++it) {
|
||||
if(const InterfacePort*port = it->second->find_param(by_name))
|
||||
return port;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Subprogram* ScopeBase::find_subprogram(perm_string name) const
|
||||
{
|
||||
map<perm_string,Subprogram*>::const_iterator cur;
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ class ScopeBase {
|
|||
bool find_constant(perm_string by_name, const VType*&typ, Expression*&exp);
|
||||
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;
|
||||
Subprogram* find_subprogram(perm_string by_name) const;
|
||||
// Moves all signals, variables and components from another scope to
|
||||
// this one. After the transfer new_* maps are emptied in the another scope.
|
||||
|
|
|
|||
Loading…
Reference in New Issue