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: whitequark/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a47714e1e336
Choose a base ref
...
head repository: whitequark/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 48b61ff0ed98
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Mar 7, 2019

  1. Copy the full SHA
    48b61ff View commit details
Showing with 7 additions and 0 deletions.
  1. +7 −0 software/glasgow/applet/internal/selftest/__init__.py
7 changes: 7 additions & 0 deletions software/glasgow/applet/internal/selftest/__init__.py
Original file line number Diff line number Diff line change
@@ -11,10 +11,17 @@ def __init__(self, applet, target):
t_b = [TSTriple() for _ in range(8)]
io_a = [target.platform.request("port_a", n) for n in range(8)]
io_b = [target.platform.request("port_b", n) for n in range(8)]
try:
user_leds = [target.platform.request("user_led", n) for n in range(5)]
except build.generic_platform.ConstraintError:
user_leds = None

self.specials += [t.get_tristate(io_a[i].io) for i, t in enumerate(t_a)]
self.specials += [t.get_tristate(io_b[i].io) for i, t in enumerate(t_b)]
self.comb += [io_a[i].oe.eq(t.oe) for i, t in enumerate(t_a) if hasattr(io_a[i], "oe")]
self.comb += [io_b[i].oe.eq(t.oe) for i, t in enumerate(t_b) if hasattr(io_b[i], "oe")]
if user_leds is not None:
self.comb += [user_leds[i].eq(1) for i in range(5)]

reg_oe_a, applet.addr_oe_a = target.registers.add_rw(8)
reg_o_a, applet.addr_o_a = target.registers.add_rw(8)