generic_platform: implicit get_fragment

This commit is contained in:
Sebastien Bourdeauducq 2013-03-12 16:14:13 +01:00
parent 4d4d6c1f88
commit c06a821452
1 changed files with 2 additions and 0 deletions

View File

@ -198,6 +198,8 @@ class GenericPlatform:
self.add_source(os.path.join(root, filename), language) self.add_source(os.path.join(root, filename), language)
def get_verilog(self, fragment, clock_domains=None, **kwargs): 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. # We may create a temporary clock/reset generator that would request pins.
# Save the constraint manager state so that such pin requests disappear # Save the constraint manager state so that such pin requests disappear
# at the end of this function. # at the end of this function.