Skip to content

Commit e96e6e7

Browse files
committed
A bug of Instance object addition in add_object() is fixed.
1 parent a80f984 commit e96e6e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

veriloggen/core/module.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,10 +645,10 @@ def add_object(self, obj):
645645

646646
if isinstance(obj, Instance):
647647
if isinstance(obj.module, Module):
648-
self.instance[obj.module.name] = obj
648+
self.instance[obj.instname] = obj
649649
self.submodule[obj.module.name] = obj.module
650650
elif isinstance(obj.module, str):
651-
self.instance[obj.module] = obj
651+
self.instance[obj.instname] = obj
652652
return
653653

654654
raise TypeError("Object type '%s' is not supported." % str(type(obj)))

0 commit comments

Comments
 (0)