From: Sebastien Bourdeauducq Date: Thu, 14 Feb 2013 19:02:35 +0000 (+0100) Subject: generic_platform: add name X-Git-Tag: 24jan2021_ls180~2099^2~443^2~68 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=38c356671741dddea401c34af42a01fb862a7f3f;p=litex.git generic_platform: add name --- diff --git a/mibuild/generic_platform.py b/mibuild/generic_platform.py index 844bcab9..09a18214 100644 --- a/mibuild/generic_platform.py +++ b/mibuild/generic_platform.py @@ -163,10 +163,13 @@ class ConstraintManager: self.request, self.platform_commands, self.io_signals = backup class GenericPlatform: - def __init__(self, device, io, default_crg_factory=None): + def __init__(self, device, io, default_crg_factory=None, name=None): self.device = device self.constraint_manager = ConstraintManager(io) self.default_crg_factory = default_crg_factory + if name is None: + name = self.__module__.split(".")[-1] + self.name = name self.sources = [] def request(self, *args, **kwargs):