From 69dbf84e545066c2908a8cf4fa9c4e618d595051 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 12 Mar 2013 16:54:01 +0100 Subject: [PATCH] sim/generic: support implicit get_fragment --- migen/sim/generic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migen/sim/generic.py b/migen/sim/generic.py index 17836612..b553dc7b 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: -- 2.30.2