Make DIP switches available as GPIO register
This commit is contained in:
parent
4f950772a1
commit
df44d1a3bc
@ -1 +1 @@
|
|||||||
Subproject commit 5bcc4e82fdc65bcd25c92e4f11a9c8421bacdea8
|
Subproject commit 79b53cf2ae2478f20ef9716ed0b63444ee7e48d3
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user