From b44813e0c59f38e52d8ef84a14167c9cf44292fe Mon Sep 17 00:00:00 2001 From: Dennis Date: Sat, 6 Nov 2021 18:00:17 -0700 Subject: [PATCH] Fix addrmap & memory/regfile/register/field-naming collision For almost all variables, the addrmap is stripped of the name. However, when a memory/regfile/register/field had the same name as the addrmap, a part of that name would also be stripped. --- srdl2sv/components/component.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srdl2sv/components/component.py b/srdl2sv/components/component.py index c818a38..657156b 100644 --- a/srdl2sv/components/component.py +++ b/srdl2sv/components/component.py @@ -374,7 +374,7 @@ class Component(): def create_underscored_path_static(obj): owning_addrmap = obj.owning_addrmap.inst_name full_path = Component.__split_dimensions(obj.get_path())[0] - path = full_path.replace(f"{owning_addrmap}.", '') + path = full_path.replace(f"{owning_addrmap}.", '', 1) path_underscored = path.replace('.', '__')