Skip to content

Commit

Permalink
Add flag to disable smart naming of instances
Browse files Browse the repository at this point in the history
  • Loading branch information
rsetaluri committed Jun 30, 2021
1 parent a268cd5 commit 410a1f1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions magma/placer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
from collections import Counter
import inspect
import textwrap
from .config import get_debug_mode
from .ref import LazyCircuit
from .view import InstView

from magma.config import get_debug_mode, config, RuntimeConfig
from magma.ref import LazyCircuit
from magma.view import InstView


config._register(disable_smart_naming=RuntimeConfig(False))


def _parse_name(inst):
Expand Down Expand Up @@ -83,7 +87,7 @@ def _debug_name(self, inst) -> bool:
name of @inst and returns True if available. Otherwise (or if debug mode
is disabled), returns False.
"""
if not get_debug_mode():
if not get_debug_mode() or config.disable_smart_naming:
return False
basename = _parse_name(inst)
if not basename:
Expand Down

0 comments on commit 410a1f1

Please sign in to comment.