Skip to content

Commit

Permalink
Merge pull request #997 from alainmarcel/alainmarcel-patch-1
Browse files Browse the repository at this point in the history
gen scope mod and iterf inst
  • Loading branch information
alaindargelas authored Jul 31, 2023
2 parents c44abd6 + 7012a97 commit 2a94756
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions templates/ElaboratorListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,21 @@ void ElaboratorListener::enterGen_scope(const gen_scope* object,
}
}

if (object->Interfaces()) {
for (interface_inst* inter : *object->Interfaces()) {
netMap.emplace(inter->VpiName(), inter);
}
}
if (object->Interface_arrays()) {
for (interface_array* inter : *object->Interface_arrays()) {
if (VectorOfinstance* instances = inter->Instances()) {
for (instance* interf : *instances) {
netMap.emplace(interf->VpiName(), interf);
}
}
}
}

// Collect instance parameters, defparams
ComponentMap paramMap;
if (object->Parameters()) {
Expand All @@ -1212,6 +1227,18 @@ void ElaboratorListener::enterGen_scope(const gen_scope* object,
ComponentMap funcMap;
ComponentMap modMap;

if (object->Modules()) {
for (module_inst* mod : *object->Modules()) {
modMap.emplace(mod->VpiName(), mod);
}
}

if (object->Module_arrays()) {
for (module_array* mod : *object->Module_arrays()) {
modMap.emplace(mod->VpiName(), mod);
}
}

// Collect gen_scope
if (object->Gen_scope_arrays()) {
for (gen_scope_array* gsa : *object->Gen_scope_arrays()) {
Expand Down

0 comments on commit 2a94756

Please sign in to comment.