Skip to content

Commit

Permalink
Merge pull request #1083 from alainmarcel/alainmarcel-patch-1
Browse files Browse the repository at this point in the history
bits in gen scope
  • Loading branch information
alaindargelas authored Sep 24, 2024
2 parents af8bb5e + f1a0344 commit e86ba8a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion templates/ExprEval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,9 @@ uint64_t ExprEval::size(const any *ts, bool &invalidValue, const any *inst,
case UHDM_OBJECT_TYPE::uhdmbit_var: {
bits = 1;
bit_var *lts = (bit_var *)ts;
if (const ref_typespec *rt = lts->Typespec()) {
bits = size(rt->Actual_typespec(), invalidValue, inst, pexpr, full);
}
ranges = lts->Ranges();
break;
}
Expand Down Expand Up @@ -1453,7 +1456,12 @@ uint64_t ExprEval::size(const any *ts, bool &invalidValue, const any *inst,
}
case UHDM_OBJECT_TYPE::uhdmref_obj: {
ref_obj *ref = (ref_obj *)ts;
if (const any *act = ref->Actual_group()) {
const any* act = ref->Actual_group();
if (act == nullptr) {
std::string_view name = ref->VpiName();
act = getObject(name, inst, pexpr, muteError);
}
if (act) {
bits = size(act, invalidValue, inst, pexpr, full);
} else {
invalidValue = true;
Expand Down

0 comments on commit e86ba8a

Please sign in to comment.