diff --git a/vvp/vpi_priv.cc b/vvp/vpi_priv.cc index 4e020e43b..43e0cde7a 100644 --- a/vvp/vpi_priv.cc +++ b/vvp/vpi_priv.cc @@ -1232,6 +1232,10 @@ static vpiHandle find_name(const char *name, vpiHandle handle) /* brute force search for the name in all objects in this scope */ for (unsigned i = 0 ; i < ref->nintern ; i += 1) { + /* The standard says that since a port does not have a full + * name it cannot be found by name. Because of this we need + * to skip ports here so the correct handle can be located. */ + if (vpi_get(vpiType, ref->intern[i]) == vpiPort) continue; char *nm = vpi_get_str(vpiName, ref->intern[i]); if (!strcmp(name, nm)) { rtn = ref->intern[i];