def Simulator(*args, **kwargs):
"""Wrapper that allows run-time selection of simulator engine"""
- if detected_new_api:
+ if detected_new_api and 'engine' not in kwargs:
kwargs['engine'] = nmigen_sim_environ_variable
return RealSimulator(*args, **kwargs)