Skip to content

Commit da51e28

Browse files
committed
add_object() method is refactored.
1 parent dd94524 commit da51e28

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

veriloggen/module.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,20 +315,18 @@ def add_object(self, obj):
315315
if isinstance(obj, vtypes.AnyType):
316316
self.io_variable[obj.name] = obj
317317
self.variable[obj.name] = obj
318+
self.global_constant[obj.name] = obj
319+
self.local_constant[obj.name] = obj
318320
return
319321

320322
if isinstance(obj, (vtypes.Input, vtypes.Output, vtypes.Inout)):
321323
self.io_variable[obj.name] = obj
322-
## no return here
323-
return ###
324+
return
324325

325326
if isinstance(obj, (vtypes.Reg, vtypes.Wire)):
326327
self.variable[obj.name] = obj
327328
return
328329

329-
if isinstance(obj, (vtypes.Input, vtypes.Output, vtypes.Inout)):
330-
return
331-
332330
if isinstance(obj, (vtypes.Integer, vtypes.Real, vtypes.Genvar)):
333331
self.variable[obj.name] = obj
334332
return

0 commit comments

Comments
 (0)