sim/generic: support implicit get_fragment

This commit is contained in:
Sebastien Bourdeauducq 2013-03-12 16:54:01 +01:00
parent d92ca43cd0
commit 69dbf84e54

View file

@ -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: