Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/nmigen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a982fbe37741
Choose a base ref
...
head repository: m-labs/nmigen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6a77122c2ed4
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 24, 2019

  1. lib.io: add a name argument to the Pin constructor.

    Jean-François Nguyen authored and whitequark committed Apr 24, 2019
    Copy the full SHA
    6a77122 View commit details
Showing with 4 additions and 2 deletions.
  1. +4 −2 nmigen/lib/io.py
6 changes: 4 additions & 2 deletions nmigen/lib/io.py
Original file line number Diff line number Diff line change
@@ -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)