mirror of
https://github.com/verilator/verilator.git
synced 2026-10-08 02:53:12 +02:00
This commit is contained in:
@@ -2360,6 +2360,19 @@ class WidthVisitor final : public VNVisitor {
|
||||
case VAttrType::DIM_SIZE: {
|
||||
AstNodeDType* const dtypep = fromDTypep(nodep->fromp());
|
||||
UASSERT_OBJ(dtypep, nodep, "Unsized expression");
|
||||
// Only worth asking while parameters are still being worked out.
|
||||
if (m_paramsOnly) {
|
||||
// A module that is still being copied does not have its final sizes.
|
||||
const AstNodeModule* const ownModp = v3Global.rootp()->containingModule(dtypep);
|
||||
if (ownModp && ownModp->parameterizedTemplate() && !ownModp->dead()) {
|
||||
UINFO(9, "size deferred, type still on template " << ownModp->name());
|
||||
// These queries always give an int, so set that now and let the
|
||||
// value be worked out once the copy exists.
|
||||
nodep->dtypeSetInt();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (VN_IS(dtypep, QueueDType) || VN_IS(dtypep, DynArrayDType)) {
|
||||
switch (nodep->attrType()) {
|
||||
case VAttrType::DIM_SIZE: {
|
||||
|
||||
Reference in New Issue
Block a user