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):
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
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]