Skip to content

Commit

Permalink
Merge 043cf12 into a418c96
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Feb 9, 2019
2 parents a418c96 + 043cf12 commit d9d9ff5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion magma/simulator/coreir_simulator.py
Expand Up @@ -11,6 +11,7 @@
from ..clock import ClockType
from ..transforms import setup_clocks, flatten
from ..circuit import CircuitType
from ..uniquification import uniquification_pass, UniquificationMode

import coreir

Expand Down Expand Up @@ -110,7 +111,15 @@ def __get_triggered_points(self):

return triggered

def __init__(self, circuit, clock, coreir_filename=None, context=None, namespaces=["global"]):
def __init__(self, circuit, clock, coreir_filename=None, context=None,
namespaces=["global"], opts={}):
uniquification_mode_str = opts.get("uniquify", "UNIQUIFY")
uniquification_mode = getattr(UniquificationMode,
uniquification_mode_str, None)
if uniquification_mode is None:
raise ValueError(f"Invalid uniquification mode "
f"{uniquification_mode_str}")
uniquification_pass(circuit, uniquification_mode)
self.watchpoints = []
self.default_scope = Scope()

Expand Down

0 comments on commit d9d9ff5

Please sign in to comment.