diff --git a/migen/sim/generic.py b/migen/sim/generic.py index 178366128..b553dc7b5 100644 --- a/migen/sim/generic.py +++ b/migen/sim/generic.py @@ -76,6 +76,8 @@ end class Simulator: def __init__(self, fragment, top_level=None, sim_runner=None, sockaddr="simsocket", **vopts): + if not isinstance(fragment, Fragment): + fragment = fragment.get_fragment() if top_level is None: top_level = TopLevel() if sim_runner is None: