From: whitequark Date: Sun, 26 May 2019 17:10:56 +0000 (+0000) Subject: back.rtlil: allow specifying platform for convert(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5155d8c3b2420071000259439298f992611ef9e2;p=nmigen.git back.rtlil: allow specifying platform for convert(). --- diff --git a/nmigen/back/rtlil.py b/nmigen/back/rtlil.py index 12415b3..1a1fabc 100644 --- a/nmigen/back/rtlil.py +++ b/nmigen/back/rtlil.py @@ -878,8 +878,8 @@ def convert_fragment(builder, fragment, hierarchy): return module.name, port_map -def convert(fragment, name="top", **kwargs): - fragment = ir.Fragment.get(fragment, platform=None).prepare(**kwargs) +def convert(fragment, name="top", platform=None, **kwargs): + fragment = ir.Fragment.get(fragment, platform).prepare(**kwargs) builder = _Builder() convert_fragment(builder, fragment, hierarchy=(name,)) return str(builder)