Skip to content

Commit

Permalink
enum const constant pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
alaindargelas committed Nov 14, 2023
1 parent 36ec06b commit 74d2f69
Show file tree
Hide file tree
Showing 20 changed files with 1,435 additions and 3,471 deletions.
26 changes: 26 additions & 0 deletions src/DesignCompile/UhdmWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3273,6 +3273,27 @@ void UhdmWriter::lateBinding(Serializer& s, DesignComponent* mod, scope* m) {
}
}
}
if (m->Typespecs()) {
for (auto n : *m->Typespecs()) {
if (n->UhdmType() == uhdmenum_typespec) {
enum_typespec* tps = any_cast<enum_typespec*>(n);
if (tps && tps->Enum_consts()) {
for (auto c : *tps->Enum_consts()) {
if (c->VpiName() == name) {
ref->Actual_group(c);
break;
}
if (std::string(std::string(m->VpiName()) +
std::string("::") + std::string(name)) ==
c->VpiName()) {
ref->Actual_group(c);
break;
}
}
}
}
}
}
}
}
if (ref->Actual_group()) break;
Expand Down Expand Up @@ -3611,6 +3632,11 @@ void UhdmWriter::lateBinding(Serializer& s, DesignComponent* mod, scope* m) {
ref->Actual_group(c);
break;
}
if (std::string(std::string(m->VpiName()) + std::string("::") +
std::string(name)) == c->VpiName()) {
ref->Actual_group(c);
break;
}
}
}
}
Expand Down
Loading

0 comments on commit 74d2f69

Please sign in to comment.