build.plat: do not prepare fragments twice.
authorwhitequark <whitequark@whitequark.org>
Mon, 19 Aug 2019 19:29:47 +0000 (19:29 +0000)
committerwhitequark <whitequark@whitequark.org>
Mon, 19 Aug 2019 19:49:51 +0000 (19:49 +0000)
Fixes #169.

nmigen/build/plat.py

index 63458500b2a2530fa52820765ccd9fa9a7d80902..edb3049795bc1cd137093e0b7a1efe2b3271adbc 100644 (file)
@@ -256,8 +256,8 @@ class TemplatedPlatform(Platform):
             assert False
 
         def emit_design(backend):
-            return {"rtlil": rtlil, "verilog": verilog}[backend].convert(fragment, name=name,
-                ports=list(self.iter_ports()), missing_domain=lambda name: None)
+            backend_mod = {"rtlil": rtlil, "verilog": verilog}[backend]
+            return backend_mod.convert_fragment(fragment, name=name)
 
         def emit_commands(format):
             commands = []