From cb22a207f1948105f7fcc9b4d6ff93d4f2bbda5f Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 19 Nov 2015 14:57:09 +0100 Subject: [PATCH] build/generic_platform: add support for int parameter for Pins (useful for core generation) --- litex/build/generic_platform.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litex/build/generic_platform.py b/litex/build/generic_platform.py index c41df891..a5a12fe1 100644 --- a/litex/build/generic_platform.py +++ b/litex/build/generic_platform.py @@ -15,7 +15,10 @@ class Pins: def __init__(self, *identifiers): self.identifiers = [] for i in identifiers: - self.identifiers += i.split() + if isinstance(i, int): + self.identifiers += ["X"]*i + else: + self.identifiers += i.split() def __repr__(self): return "{}('{}')".format(self.__class__.__name__, -- 2.30.2