Skip to content

Commit

Permalink
Merge pull request #123 from jerryz123/patch-1
Browse files Browse the repository at this point in the history
Set PeripheryKey defaults to Nil
  • Loading branch information
hcook authored May 5, 2020
2 parents 3491418 + 6aed565 commit 3c78e85
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/devices/gpio/GPIOPeriphery.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import freechips.rocketchip.config.Field
import freechips.rocketchip.diplomacy._
import freechips.rocketchip.subsystem.BaseSubsystem

case object PeripheryGPIOKey extends Field[Seq[GPIOParams]]
case object PeripheryGPIOKey extends Field[Seq[GPIOParams]](Nil)

trait HasPeripheryGPIO { this: BaseSubsystem =>
val gpioNodes = p(PeripheryGPIOKey).map { ps =>
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/devices/i2c/I2CPeriphery.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import freechips.rocketchip.config.Field
import freechips.rocketchip.diplomacy._
import freechips.rocketchip.subsystem.{BaseSubsystem}

case object PeripheryI2CKey extends Field[Seq[I2CParams]]
case object PeripheryI2CKey extends Field[Seq[I2CParams]](Nil)

trait HasPeripheryI2C { this: BaseSubsystem =>
val i2cNodes = p(PeripheryI2CKey).map { ps =>
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/devices/pwm/PWMPeriphery.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import freechips.rocketchip.config.Field
import freechips.rocketchip.diplomacy._
import freechips.rocketchip.subsystem.BaseSubsystem

case object PeripheryPWMKey extends Field[Seq[PWMParams]]
case object PeripheryPWMKey extends Field[Seq[PWMParams]](Nil)

trait HasPeripheryPWM { this: BaseSubsystem =>
val pwmNodes = p(PeripheryPWMKey).map { ps =>
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/devices/spi/SPIPeriphery.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import freechips.rocketchip.config.Field
import freechips.rocketchip.subsystem.{BaseSubsystem}
import freechips.rocketchip.diplomacy._

case object PeripherySPIKey extends Field[Seq[SPIParams]]
case object PeripherySPIKey extends Field[Seq[SPIParams]](Nil)

trait HasPeripherySPI { this: BaseSubsystem =>
val spiNodes = p(PeripherySPIKey).map { ps =>
Expand All @@ -23,7 +23,7 @@ trait HasPeripherySPIModuleImp extends LazyModuleImp with HasPeripherySPIBundle
val spi = outer.spiNodes.zipWithIndex.map { case(n,i) => n.makeIO()(ValName(s"spi_$i")) }
}

case object PeripherySPIFlashKey extends Field[Seq[SPIFlashParams]]
case object PeripherySPIFlashKey extends Field[Seq[SPIFlashParams]](Nil)

trait HasPeripherySPIFlash { this: BaseSubsystem =>
val qspiNodes = p(PeripherySPIFlashKey).map { ps =>
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/devices/uart/UARTPeriphery.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import freechips.rocketchip.config.Field
import freechips.rocketchip.diplomacy._
import freechips.rocketchip.subsystem.{BaseSubsystem, PeripheryBusKey}

case object PeripheryUARTKey extends Field[Seq[UARTParams]]
case object PeripheryUARTKey extends Field[Seq[UARTParams]](Nil)

trait HasPeripheryUART { this: BaseSubsystem =>
val uartNodes = p(PeripheryUARTKey).map { ps =>
Expand Down

0 comments on commit 3c78e85

Please sign in to comment.