generic_platform: implicit get_fragment
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Tue, 12 Mar 2013 15:14:13 +0000 (16:14 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Tue, 12 Mar 2013 15:14:13 +0000 (16:14 +0100)
mibuild/generic_platform.py

index ca5d9bd07ac6f4242ed83f9487a4f13cb6d00edf..89360bc49f1d935622029fb30c52c3e755854b2d 100644 (file)
@@ -198,6 +198,8 @@ class GenericPlatform:
                                        self.add_source(os.path.join(root, filename), language)
 
        def get_verilog(self, fragment, clock_domains=None, **kwargs):
+               if not isinstance(fragment, Fragment):
+                       fragment = fragment.get_fragment()
                # We may create a temporary clock/reset generator that would request pins.
                # Save the constraint manager state so that such pin requests disappear
                # at the end of this function.