mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-29 09:09:58 +02:00
Allow modules (and program blocks in particular) to nest.
An important advantage of program blocks is its ability to nest within a module. This winds up also allowing modules to nest, which is legal but presumably less used feature.
This commit is contained in:
@@ -65,7 +65,7 @@ class Module : public PScopeExtra, public LineInfo {
|
||||
public:
|
||||
/* The name passed here is the module name, not the instance
|
||||
name. This make must be a permallocated string. */
|
||||
explicit Module(perm_string name);
|
||||
explicit Module(LexicalScope*parent, perm_string name);
|
||||
~Module();
|
||||
|
||||
/* Initially false. This is set to true if the module has been
|
||||
@@ -121,6 +121,10 @@ class Module : public PScopeExtra, public LineInfo {
|
||||
the module definition. These are used at elaboration time. */
|
||||
list<PGenerate*> generate_schemes;
|
||||
|
||||
/* Nested modules are placed here, and are not elaborated
|
||||
unless they are instantiated, implicitly or explicitly. */
|
||||
std::map<perm_string,Module*> nested_modules;
|
||||
|
||||
list<PSpecPath*> specify_paths;
|
||||
|
||||
// The mod_name() is the name of the module type.
|
||||
|
||||
Reference in New Issue
Block a user