lib.io: add a name argument to the Pin constructor.
This commit is contained in:
parent
a982fbe377
commit
6a77122c2e
|
@ -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
|
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``
|
is DDR; the signal ``i0`` reflects the value at the rising edge, and the signal ``i1``
|
||||||
reflects the value at the falling edge.
|
reflects the value at the falling edge.
|
||||||
|
name : str
|
||||||
|
Name of the underlying record.
|
||||||
|
|
||||||
Attributes
|
Attributes
|
||||||
----------
|
----------
|
||||||
|
@ -84,9 +86,9 @@ class Pin(Record):
|
||||||
I/O buffer output enable. Present if ``dir="io"``. Buffers generally cannot change
|
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.
|
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.width = width
|
||||||
self.dir = dir
|
self.dir = dir
|
||||||
self.xdr = xdr
|
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)
|
||||||
|
|
Loading…
Reference in a new issue