build/generic_platform: add support for int parameter for Pins (useful for core gener...
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Thu, 19 Nov 2015 13:57:09 +0000 (14:57 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Thu, 19 Nov 2015 13:57:09 +0000 (14:57 +0100)
litex/build/generic_platform.py

index c41df89125af869967631d58593034eb5c2af821..a5a12fe12c0d2f7fb41ec4171652c68b2b36bcd2 100644 (file)
@@ -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__,