Skip to content

Commit fbd58c6

Browse files
committed
Add flag to disable smart naming of instances
1 parent f581981 commit fbd58c6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

magma/placer.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
from collections import Counter
44
import inspect
55
import textwrap
6-
from .config import get_debug_mode
7-
from .ref import LazyCircuit
8-
from .view import InstView
6+
7+
from magma.config import get_debug_mode, config, RuntimeConfig
8+
from magma.ref import LazyCircuit
9+
from magma.view import InstView
10+
11+
12+
config._register(disable_smart_naming=RuntimeConfig(False))
913

1014

1115
def _parse_name(inst):
@@ -83,7 +87,7 @@ def _debug_name(self, inst) -> bool:
8387
name of @inst and returns True if available. Otherwise (or if debug mode
8488
is disabled), returns False.
8589
"""
86-
if not get_debug_mode():
90+
if not get_debug_mode() or config.disable_smart_naming:
8791
return False
8892
basename = _parse_name(inst)
8993
if not basename:

0 commit comments

Comments
 (0)