Skip to content

Commit

Permalink
Frontend: Restrict Bus type parameter to Bundle-extending
Browse files Browse the repository at this point in the history
Internal-tag: [#69079]
Signed-off-by: Wiktoria Kuna <[email protected]>
  • Loading branch information
wkkuna committed Nov 22, 2024
1 parent 0361ade commit 635a6d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/DMAController/Frontend/BusBase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ import chisel3.util._
import DMAController.DMADriver
import DMAController.DMAConfig._

abstract class IOBus[+T](config: DMAConfig) extends DMAModule(config) {
abstract class IOBus[T <: Bundle](config: DMAConfig) extends DMAModule(config) {
val io : Bundle {
val bus : T
val dataIO : DecoupledIO[UInt]
val xfer : XferDescBundle
}
}

abstract class CSRBus[+T] (config: DMAConfig) extends DMAModule(config) {
abstract class CSRBus[T <: Bundle] (config: DMAConfig) extends DMAModule(config) {
val io : Bundle {
val bus : CSRBusBundle
val ctl : T
Expand Down

0 comments on commit 635a6d7

Please sign in to comment.