Skip to content

Commit

Permalink
Only set inst.stack in debug_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Apr 29, 2019
1 parent 7641e86 commit e787753
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion magma/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,8 @@ def place(cls, inst):
inst.name = f"{type(inst).name}_inst{str(cls.instanced_circuits_counter[type(inst).name])}"
cls.instanced_circuits_counter[type(inst).name] += 1
inst.defn = cls
inst.stack = inspect.stack()
if get_debug_mode():
inst.stack = inspect.stack()
cls.instances.append(inst)


Expand Down

0 comments on commit e787753

Please sign in to comment.