Make DIP switches available as GPIO register

This commit is contained in:
Klemens Schölhorn 2018-05-01 00:09:14 +02:00
parent 4f950772a1
commit df44d1a3bc
2 changed files with 4 additions and 3 deletions

@ -1 +1 @@
Subproject commit 5bcc4e82fdc65bcd25c92e4f11a9c8421bacdea8 Subproject commit 79b53cf2ae2478f20ef9716ed0b63444ee7e48d3

View File

@ -55,9 +55,10 @@ class U500ML507DevKitFPGAChip(implicit override val p: Parameters)
GPIOPinsFromPort(gpio_pins, dut.gpio(0)) GPIOPinsFromPort(gpio_pins, dut.gpio(0))
gpio_pins.pins.foreach { _.i.ival := Bool(false) }
gpio_pins.pins.zipWithIndex.foreach { gpio_pins.pins.zipWithIndex.foreach {
case(pin, idx) => led(idx) := pin.o.oval case(pin, idx) =>
pin.i.ival := dip(idx)
led(idx) := pin.o.oval
} }
} }