From: Sebastien Bourdeauducq Date: Tue, 26 Mar 2013 18:17:35 +0000 (+0100) Subject: Support for platform info X-Git-Tag: 24jan2021_ls180~2099^2~443^2~46 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3b19dfc412137393f1f3d3d5907f3aca05c21bd8;p=litex.git Support for platform info --- diff --git a/mibuild/generic_platform.py b/mibuild/generic_platform.py index e3436045..3ff2f02e 100644 --- a/mibuild/generic_platform.py +++ b/mibuild/generic_platform.py @@ -31,6 +31,10 @@ class Subsignal: self.name = name self.constraints = list(constraints) +class PlatformInfo: + def __init__(self, info): + self.info = info + def _lookup(description, name, number): for resource in description: if resource[0] == name and (number is None or resource[1] == number): @@ -79,6 +83,10 @@ class ConstraintManager: obj = Signal(rt, name_override=resource[0]) else: obj = Record(rt, name=resource[0]) + for element in resource[2:]: + if isinstance(element, PlatformInfo): + obj.platform_info = element.info + break self.available.remove(resource) self.matched.append((resource, obj)) return obj diff --git a/mibuild/xilinx_ise.py b/mibuild/xilinx_ise.py index 7d194c53..cddbbb81 100644 --- a/mibuild/xilinx_ise.py +++ b/mibuild/xilinx_ise.py @@ -46,7 +46,11 @@ def _format_constraint(c): return c.misc def _format_ucf(signame, pin, others, resname): - fmt_c = [_format_constraint(c) for c in ([Pins(pin)] + others)] + fmt_c = [] + for c in [Pins(pin)] + others: + fc = _format_constraint(c) + if fc is not None: + fmt_c.append(fc) fmt_r = resname[0] + ":" + str(resname[1]) if resname[2] is not None: fmt_r += "." + resname[2]