back.rtlil: accept any elaboratable, not just fragments.
authorwhitequark <cz@m-labs.hk>
Sat, 26 Jan 2019 16:11:29 +0000 (16:11 +0000)
committerwhitequark <cz@m-labs.hk>
Sat, 26 Jan 2019 16:11:29 +0000 (16:11 +0000)
nmigen/back/rtlil.py

index 4d78b8286e9cca9e5b579935212cebd32a2bb97a..f85fcea4135f151de0d4307f472dbc02c2453bbb 100644 (file)
@@ -844,7 +844,7 @@ def convert_fragment(builder, fragment, name, top):
 
 
 def convert(fragment, name="top", **kwargs):
-    fragment = fragment.prepare(**kwargs)
+    fragment = ir.Fragment.get(fragment, platform=None).prepare(**kwargs)
     builder = _Builder()
     convert_fragment(builder, fragment, name=name, top=True)
     return str(builder)