From 3f69998864149e0d62f560d8c975f32ca4eabb0e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Fran=C3=A7ois=20Nguyen?= Date: Wed, 24 Apr 2019 23:58:01 +0200 Subject: [PATCH] lib.io: add a name argument to the Pin constructor. --- nmigen/lib/io.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nmigen/lib/io.py b/nmigen/lib/io.py index e8f67f1..f77dde6 100644 --- a/nmigen/lib/io.py +++ b/nmigen/lib/io.py @@ -65,6 +65,8 @@ class Pin(Record): are present instead, where ``N in range(0, N)``. For example, if ``xdr=2``, the I/O buffer is DDR; the signal ``i0`` reflects the value at the rising edge, and the signal ``i1`` reflects the value at the falling edge. + name : str + Name of the underlying record. Attributes ---------- @@ -84,9 +86,9 @@ class Pin(Record): I/O buffer output enable. Present if ``dir="io"``. Buffers generally cannot change direction more than once per cycle, so at most one output enable signal is present. """ - def __init__(self, width, dir, xdr=1): + def __init__(self, width, dir, xdr=1, name=None): self.width = width self.dir = dir self.xdr = xdr - super().__init__(pin_layout(self.width, self.dir, self.xdr)) + super().__init__(pin_layout(self.width, self.dir, self.xdr), name=name) -- 2.30.2