Handle case that strings are arguments of functions/tasks.
When strings are arguments to functions/tasks, that doesn't suddenly make them implicitly scalar. Strings are vectors and should be treated that was, even if they are IMPLICIT_REG. Ported from git master.
This commit is contained in:
parent
055dcf60cb
commit
f1990caf6f
|
|
@ -932,9 +932,15 @@ NetNet* PWire::elaborate_sig(Design*des, NetScope*scope) const
|
|||
wtype = NetNet::WIRE;
|
||||
is_implicit_scalar = true;
|
||||
}
|
||||
// Certain contexts, such as arguments to functions, presume
|
||||
// "reg" instead of "wire". The parser reports these as
|
||||
// IMPLICIT_REG. Also, certain cases, such as:
|
||||
// fun(string arg1) ...
|
||||
// are implicitly NOT scalar, so detect that case here.
|
||||
if (wtype == NetNet::IMPLICIT_REG) {
|
||||
wtype = NetNet::REG;
|
||||
is_implicit_scalar = true;
|
||||
if (data_type_!=IVL_VT_STRING)
|
||||
is_implicit_scalar = true;
|
||||
}
|
||||
|
||||
unsigned wid = 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue