back.rtlil: allow specifying platform for convert().
authorwhitequark <cz@m-labs.hk>
Sun, 26 May 2019 17:10:56 +0000 (17:10 +0000)
committerwhitequark <cz@m-labs.hk>
Sun, 26 May 2019 17:10:56 +0000 (17:10 +0000)
nmigen/back/rtlil.py

index 12415b3dce55e59eba7c5dfb8f7083a0d6638e35..1a1fabc47f58d6bbc7442455523533dab8de5090 100644 (file)
@@ -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)