1
0

use cloneType in PhysicalNetworkIO

This commit is contained in:
Andrew Waterman 2015-08-05 16:47:49 -07:00
parent 798ddeb5f5
commit eb6583d607

View File

@ -13,7 +13,7 @@ class PhysicalHeader(n: Int) extends Bundle {
class PhysicalNetworkIO[T <: Data](n: Int, dType: T) extends Bundle { class PhysicalNetworkIO[T <: Data](n: Int, dType: T) extends Bundle {
val header = new PhysicalHeader(n) val header = new PhysicalHeader(n)
val payload = dType val payload = dType.cloneType
override def cloneType = new PhysicalNetworkIO(n,dType).asInstanceOf[this.type] override def cloneType = new PhysicalNetworkIO(n,dType).asInstanceOf[this.type]
} }