Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/DesignCompile/CompileType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1936,6 +1936,16 @@ UHDM::typespec* CompileHelper::compileTypespec(
pats->Elem_typespec(resultRef);
pats->Ranges(ranges);
result = pats;
} else if (dstype == uhdmbit_typespec) {
// `bit8_t [3:0] a` (typedef-of-bit packed array) — wrap the
// referenced typedef in a packed_array_typespec carrying the
// outer ranges, mirroring the logic_typespec branch above.
// Without this, the outer dimension is silently dropped and
// the field ends up the width of just the typedef.
packed_array_typespec* pats = s.MakePacked_array_typespec();
pats->Elem_typespec(resultRef);
pats->Ranges(ranges);
result = pats;
} else if (dstype == uhdmarray_typespec ||
dstype == uhdminterface_typespec) {
array_typespec* pats = s.MakeArray_typespec();
Expand Down
Loading