1 // See LICENSE for license details.
2 package sifive.freedom.unleashed.u500vc707devkit
5 import chisel3.experimental.{withClockAndReset}
7 import freechips.rocketchip.config._
8 import freechips.rocketchip.diplomacy._
10 import sifive.blocks.devices.gpio._
11 import sifive.blocks.devices.pinctrl.{BasePin}
13 import sifive.fpgashells.shell.xilinx.vc707shell.{VC707Shell}
14 import sifive.fpgashells.ip.xilinx.{IOBUF}
16 //-------------------------------------------------------------------------
18 //-------------------------------------------------------------------------
21 def apply(): BasePin = {
26 //-------------------------------------------------------------------------
27 // U500VC707DevKitFPGAChip
28 //-------------------------------------------------------------------------
30 class U500VC707DevKitFPGAChip(implicit override val p: Parameters) extends VC707Shell {
32 //-----------------------------------------------------------------------
34 //-----------------------------------------------------------------------
36 // Connect the clock to the 50 Mhz output from the PLL
38 withClockAndReset(dut_clock, dut_reset) {
39 val dut = Module(LazyModule(new U500VC707DevKitSystem).module)
41 //---------------------------------------------------------------------
42 // Connect peripherals
43 //---------------------------------------------------------------------
51 //---------------------------------------------------------------------
53 //---------------------------------------------------------------------
55 val gpioParams = p(PeripheryGPIOKey)
56 val gpio_pins = Wire(new GPIOPins(() => PinGen(), gpioParams(0)))
58 gpio_pins.fromPort(dut.gpio(0))
60 gpio_pins.pins.foreach { _.i.ival := Bool(false) }
61 gpio_pins.pins.zipWithIndex.foreach {
62 case(pin, idx) => led(idx) := pin.o.oval
66 for( idx <- 7 to 4 ) { led(idx) := false.B }