diplomacy: update to new API (#40)
[sifive-blocks.git] / src / main / scala / devices / gpio / GPIOPeriphery.scala
index 109ffb82991df1dcea50c16d013624b5f81373fb..149f7074d03ed09bd9d54622c335b5fe022066f1 100644 (file)
@@ -4,14 +4,14 @@ package sifive.blocks.devices.gpio
 import Chisel._
 import freechips.rocketchip.config.Field
 import freechips.rocketchip.coreplex.{HasPeripheryBus, HasInterruptBus}
-import freechips.rocketchip.diplomacy.{LazyModule,LazyMultiIOModuleImp}
+import freechips.rocketchip.diplomacy.{LazyModule,LazyModuleImp}
 import freechips.rocketchip.util.HeterogeneousBag
 
 case object PeripheryGPIOKey extends Field[Seq[GPIOParams]]
 
 trait HasPeripheryGPIO extends HasPeripheryBus with HasInterruptBus {
   val gpioParams = p(PeripheryGPIOKey)
-  val gpio = gpioParams map { params =>
+  val gpios = gpioParams map { params =>
     val gpio = LazyModule(new TLGPIO(pbus.beatBytes, params))
     gpio.node := pbus.toVariableWidthSlaves
     ibus.fromSync := gpio.intnode
@@ -23,11 +23,11 @@ trait HasPeripheryGPIOBundle {
   val gpio: HeterogeneousBag[GPIOPortIO]
 }
 
-trait HasPeripheryGPIOModuleImp extends LazyMultiIOModuleImp with HasPeripheryGPIOBundle {
+trait HasPeripheryGPIOModuleImp extends LazyModuleImp with HasPeripheryGPIOBundle {
   val outer: HasPeripheryGPIO
   val gpio = IO(HeterogeneousBag(outer.gpioParams.map(new GPIOPortIO(_))))
 
-  (gpio zip outer.gpio) foreach { case (io, device) =>
+  (gpio zip outer.gpios) foreach { case (io, device) =>
     io <> device.module.io.port
   }
 }