1
0

sifive-blocks: trust diplomacy to get names right

This commit is contained in:
Wesley W. Terpstra 2017-02-01 13:53:54 -08:00
parent 535be3e976
commit c010a1557a
3 changed files with 9 additions and 9 deletions

View File

@ -30,8 +30,8 @@ class PWMGPIOPort(c: PWMBundleConfig)(implicit p: Parameters) extends Module {
trait PeripheryPWM {
this: TopNetwork { val pwmConfigs: Seq[PWMConfig] } =>
val pwmDevices = (pwmConfigs.zipWithIndex) map { case (c, i) =>
val pwm = LazyModule(new TLPWM(c) { override lazy val valName = Some(s"pwm$i") })
val pwm = (pwmConfigs.zipWithIndex) map { case (c, i) =>
val pwm = LazyModule(new TLPWM(c))
pwm.node := TLFragmenter(peripheryBusConfig.beatBytes, cacheBlockBytes)(peripheryBus.node)
intBus.intnode := pwm.intnode
pwm
@ -52,7 +52,7 @@ trait PeripheryPWMModule {
val outer: PeripheryPWM
val io: PeripheryPWMBundle
} =>
(io.pwms.zipWithIndex zip outer.pwmDevices) foreach { case ((io, i), device) =>
(io.pwms.zipWithIndex zip outer.pwm) foreach { case ((io, i), device) =>
io.port := device.module.io.gpio
}
}

View File

@ -8,8 +8,8 @@ import rocketchip.{TopNetwork,TopNetworkModule}
trait PeripherySPI {
this: TopNetwork { val spiConfigs: Seq[SPIConfig] } =>
val spiDevices = (spiConfigs.zipWithIndex) map {case (c, i) =>
val spi = LazyModule(new TLSPI(c) { override lazy val valName = Some(s"spi$i") } )
val spi = (spiConfigs.zipWithIndex) map {case (c, i) =>
val spi = LazyModule(new TLSPI(c))
spi.rnode := TLFragmenter(peripheryBusConfig.beatBytes, cacheBlockBytes)(peripheryBus.node)
intBus.intnode := spi.intnode
spi
@ -28,7 +28,7 @@ trait PeripherySPIModule {
val outer: PeripherySPI
val io: PeripherySPIBundle
} =>
(io.spis zip outer.spiDevices).foreach { case (io, device) =>
(io.spis zip outer.spi).foreach { case (io, device) =>
io <> device.module.io.port
}
}

View File

@ -14,8 +14,8 @@ trait PeripheryUART {
this: TopNetwork {
val uartConfigs: Seq[UARTConfig]
} =>
val uartDevices = uartConfigs.zipWithIndex.map { case (c, i) =>
val uart = LazyModule(new UART(c) { override lazy val valName = Some(s"uart$i") } )
val uart = uartConfigs.zipWithIndex.map { case (c, i) =>
val uart = LazyModule(new UART(c))
uart.node := TLFragmenter(peripheryBusConfig.beatBytes, cacheBlockBytes)(peripheryBus.node)
intBus.intnode := uart.intnode
uart
@ -32,7 +32,7 @@ trait PeripheryUARTModule {
val outer: PeripheryUART
val io: PeripheryUARTBundle
} =>
(io.uarts zip outer.uartDevices).foreach { case (io, device) =>
(io.uarts zip outer.uart).foreach { case (io, device) =>
io <> device.module.io.port
}
}