From: Sebastien Bourdeauducq Date: Tue, 12 Mar 2013 15:54:01 +0000 (+0100) Subject: sim/generic: support implicit get_fragment X-Git-Tag: 24jan2021_ls180~2099^2~651 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=69dbf84e545066c2908a8cf4fa9c4e618d595051;p=litex.git sim/generic: support implicit get_fragment --- 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: