1
0

make some base bundle classes easier to clone (#20)

This commit is contained in:
Henry Cook
2017-06-14 19:47:56 -07:00
committed by GitHub
parent 90d3931f5a
commit 473464eaa9
2 changed files with 4 additions and 3 deletions

View File

@ -2,8 +2,9 @@
package sifive.blocks.devices.spi
import Chisel._
import util.GenericParameterizedBundle
abstract class SPIBundle(val c: SPIParamsBase) extends Bundle {
abstract class SPIBundle(val c: SPIParamsBase) extends GenericParameterizedBundle(c) {
override def cloneType: SPIBundle.this.type =
this.getClass.getConstructors.head.newInstance(c).asInstanceOf[this.type]
}