Skip to content

Commit

Permalink
Make oe in SRAMResource optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
cr1901 authored and whitequark committed Aug 4, 2019
1 parent e701859 commit 9b532be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nmigen_boards/dev/sram.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
__all__ = ["SRAMResource"]


def SRAMResource(*args, cs, oe, we, a, d, dm=None, attrs=None):
def SRAMResource(*args, cs, oe=None, we, a, d, dm=None, attrs=None):
io = []
io.append(Subsignal("cs", PinsN(cs, dir="o", assert_width=1)))
io.append(Subsignal("oe", PinsN(oe, dir="o", assert_width=1)))
if oe is not None:
# Asserted WE# deactivates the D output buffers, so WE# can be used to replace OE#.
io.append(Subsignal("oe", PinsN(oe, dir="o", assert_width=1)))
io.append(Subsignal("we", PinsN(we, dir="o", assert_width=1)))
io.append(Subsignal("a", Pins(a, dir="o")))
io.append(Subsignal("d", Pins(d, dir="io")))
Expand Down

0 comments on commit 9b532be

Please sign in to comment.