When the file is in the current path, an error will be reported. (#113) Co-authored-by: Tim 'mithro' Ansell <me@mith.ro>
diff --git a/v2x/vlog_to_pbtype.py b/v2x/vlog_to_pbtype.py index de5db80..b2f6bcd 100755 --- a/v2x/vlog_to_pbtype.py +++ b/v2x/vlog_to_pbtype.py
@@ -580,7 +580,9 @@ module_prefix = re.match(r"([A-Za-z0-9_]+)\.sim\.v", module_basename).groups()[0] - pb_type_path = "{}/{}.pb_type.xml".format(module_path, module_prefix) + pb_type_path = "{}.pb_type.xml".format(module_prefix) + if module_path: + pb_type_path = os.path.join(module_path, pb_type_path) include_as_is = True comment_str = ""