Skip to content

Commit f0b7bb0

Browse files
sequencerdavidbiancolin
authored andcommitted
remove cloneType
1 parent 97ac96f commit f0b7bb0

17 files changed

+0
-33
lines changed

Diff for: src/main/scala/amba/axis/Bundles.scala

-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ case class AXISDataField(width: Int) extends BundleField(AXISData) {
2424
}
2525

2626
class AXISBundleBits(val params: AXISBundleParameters) extends BundleMap(AXISBundle.keys(params)) {
27-
override def cloneType: this.type = (new AXISBundleBits(params)).asInstanceOf[this.type]
2827
def last = if (params.hasLast) apply(AXISLast) else true.B
2928
def id = if (params.hasId) apply(AXISId) else 0.U
3029
def dest = if (params.hasDest) apply(AXISDest) else 0.U
@@ -34,7 +33,6 @@ class AXISBundleBits(val params: AXISBundleParameters) extends BundleMap(AXISBun
3433
}
3534

3635
class AXISBundle(val params: AXISBundleParameters) extends IrrevocableIO(new AXISBundleBits(params)) {
37-
override def cloneType: this.type = (new AXISBundle(params)).asInstanceOf[this.type]
3836
}
3937

4038
object AXISBundle {

Diff for: src/main/scala/devices/debug/DMI.scala

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ class DMIReq(addrBits : Int) extends Bundle {
4242
val data = UInt(DMIConsts.dmiDataSize.W)
4343
val op = UInt(DMIConsts.dmiOpSize.W)
4444

45-
override def cloneType = new DMIReq(addrBits).asInstanceOf[this.type]
4645
}
4746

4847
/** Structure to define the contents of a Debug Bus Response

Diff for: src/main/scala/devices/debug/DebugTransport.scala

-2
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,13 @@ class DMIAccessUpdate(addrBits: Int) extends Bundle {
4040
val data = UInt(DMIConsts.dmiDataSize.W)
4141
val op = UInt(DMIConsts.dmiOpSize.W)
4242

43-
override def cloneType = new DMIAccessUpdate(addrBits).asInstanceOf[this.type]
4443
}
4544

4645
class DMIAccessCapture(addrBits: Int) extends Bundle {
4746
val addr = UInt(addrBits.W)
4847
val data = UInt(DMIConsts.dmiDataSize.W)
4948
val resp = UInt(DMIConsts.dmiRespSize.W)
5049

51-
override def cloneType = new DMIAccessCapture(addrBits).asInstanceOf[this.type]
5250

5351
}
5452

Diff for: src/main/scala/jtag/JtagShifter.scala

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ trait ChainIO extends Bundle {
3636
class Capture[+T <: Data](gen: T) extends Bundle {
3737
val bits = Input(gen) // data to capture, should be always valid
3838
val capture = Output(Bool()) // will be high in capture state (single cycle), captured on following rising edge
39-
override def cloneType = Capture(gen).asInstanceOf[this.type]
4039
}
4140

4241
object Capture {

Diff for: src/main/scala/jtag/JtagTap.scala

-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class JTAGIO(hasTRSTn: Boolean = false) extends Bundle {
1616
val TDI = Output(Bool())
1717
val TDO = Input(new Tristate())
1818

19-
override def cloneType = new JTAGIO(hasTRSTn).asInstanceOf[this.type]
2019
}
2120

2221
/** JTAG block output signals.
@@ -26,7 +25,6 @@ class JtagOutput(irLength: Int) extends Bundle {
2625
val instruction = Output(UInt(irLength.W)) // current active instruction
2726
val tapIsInTestLogicReset = Output(Bool()) // synchronously asserted in Test-Logic-Reset state, should NOT hold the FSM in reset
2827

29-
override def cloneType = new JtagOutput(irLength).asInstanceOf[this.type]
3028
}
3129

3230
class JtagControl extends Bundle {
@@ -42,7 +40,6 @@ class JtagBlockIO(irLength: Int, hasIdcode:Boolean = true) extends Bundle {
4240
val output = new JtagOutput(irLength)
4341
val idcode = if (hasIdcode) Some(Input(new JTAGIdcodeBundle())) else None
4442

45-
override def cloneType = new JtagBlockIO(irLength, hasIdcode).asInstanceOf[this.type]
4643
}
4744

4845
/** Internal controller block IO with data shift outputs.
@@ -51,7 +48,6 @@ class JtagControllerIO(irLength: Int) extends JtagBlockIO(irLength, false) {
5148
val dataChainOut = Output(new ShifterIO)
5249
val dataChainIn = Input(new ShifterIO)
5350

54-
override def cloneType = new JtagControllerIO(irLength).asInstanceOf[this.type]
5551
}
5652

5753
/** JTAG TAP controller internal block, responsible for instruction decode and data register chain

Diff for: src/main/scala/regmapper/RegisterCrossing.scala

-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ class RegisterWriteIO[T <: Data](gen: T) extends Bundle {
5353
val request = Decoupled(gen).flip
5454
val response = Irrevocable(Bool()) // ignore .bits
5555

56-
override def cloneType = new RegisterWriteIO(gen).asInstanceOf[this.type]
5756
}
5857

5958
// To turn off=>on a domain:
@@ -129,7 +128,6 @@ class RegisterReadIO[T <: Data](gen: T) extends Bundle {
129128
val request = Decoupled(Bool()).flip // ignore .bits
130129
val response = Irrevocable(gen)
131130

132-
override def cloneType = new RegisterReadIO(gen).asInstanceOf[this.type]
133131
}
134132

135133
class RegisterReadCrossingIO[T <: Data](gen: T) extends Bundle {

Diff for: src/main/scala/rocket/ICache.scala

-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ class ICacheResp(outer: ICache) extends Bundle {
104104
val replay = Bool()
105105
val ae = Bool()
106106

107-
override def cloneType = new ICacheResp(outer).asInstanceOf[this.type]
108107
}
109108

110109
class ICachePerfEvents extends Bundle {

Diff for: src/main/scala/rocket/Multiplier.scala

-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@ class MultiplierReq(dataBits: Int, tagBits: Int) extends Bundle {
1515
val in1 = Bits(dataBits.W)
1616
val in2 = Bits(dataBits.W)
1717
val tag = UInt(tagBits.W)
18-
override def cloneType = new MultiplierReq(dataBits, tagBits).asInstanceOf[this.type]
1918
}
2019

2120
class MultiplierResp(dataBits: Int, tagBits: Int) extends Bundle {
2221
val data = Bits(dataBits.W)
2322
val tag = UInt(tagBits.W)
24-
override def cloneType = new MultiplierResp(dataBits, tagBits).asInstanceOf[this.type]
2523
}
2624

2725
class MultiplierIO(val dataBits: Int, val tagBits: Int) extends Bundle {

Diff for: src/main/scala/rocket/NBDcache.scala

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class WritebackReq(params: TLBundleParameters)(implicit p: Parameters) extends L
4848
val way_en = Bits(width = nWays)
4949
val voluntary = Bool()
5050

51-
override def cloneType = new WritebackReq(params)(p).asInstanceOf[this.type]
5251
}
5352

5453
class IOMSHR(id: Int)(implicit edge: TLEdgeOut, p: Parameters) extends L1HellaCacheModule()(p) {

Diff for: src/main/scala/rocket/PTW.scala

-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ class L2TLBEntry(nSets: Int)(implicit p: Parameters) extends CoreBundle()(p)
110110
val w = Bool()
111111
val r = Bool()
112112

113-
override def cloneType = new L2TLBEntry(nSets).asInstanceOf[this.type]
114113
}
115114

116115
@chiselName

Diff for: src/main/scala/rocket/TLB.scala

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class TLBReq(lgMaxSize: Int)(implicit p: Parameters) extends CoreBundle()(p) {
3838
val prv = UInt(PRV.SZ.W)
3939
val v = Bool()
4040

41-
override def cloneType = new TLBReq(lgMaxSize).asInstanceOf[this.type]
4241
}
4342

4443
class TLBExceptions(implicit p: Parameters) extends CoreBundle()(p) {

Diff for: src/main/scala/tile/FPU.scala

-4
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ class FPInput(implicit p: Parameters) extends CoreBundle()(p) with HasFPUCtrlSig
231231
val in2 = Bits(width = fLen+1)
232232
val in3 = Bits(width = fLen+1)
233233

234-
override def cloneType = new FPInput().asInstanceOf[this.type]
235234
}
236235

237236
case class FType(exp: Int, sig: Int) {
@@ -283,7 +282,6 @@ case class FType(exp: Int, sig: Int) {
283282
val sign = Bool()
284283
val exp = UInt(expWidth.W)
285284
val sig = UInt((ieeeWidth-expWidth-1).W)
286-
override def cloneType = new IEEEBundle().asInstanceOf[this.type]
287285
}
288286
new IEEEBundle
289287
}
@@ -452,7 +450,6 @@ class FPToInt(implicit p: Parameters) extends FPUModule()(p) with ShouldBeRetime
452450
val store = Bits(width = fLen)
453451
val toint = Bits(width = xLen)
454452
val exc = Bits(width = FPConstants.FLAGS_SZ)
455-
override def cloneType = new Output().asInstanceOf[this.type]
456453
}
457454
val io = new Bundle {
458455
val in = Valid(new FPInput).flip
@@ -903,7 +900,6 @@ class FPU(cfg: FPUParams)(implicit p: Parameters) extends FPUModule()(p) {
903900
val typeTag = UInt(width = log2Up(floatTypes.size))
904901
val cp = Bool()
905902
val pipeid = UInt(width = log2Ceil(pipes.size))
906-
override def cloneType: this.type = new WBInfo().asInstanceOf[this.type]
907903
}
908904

909905
val wen = Reg(init=Bits(0, maxLatency-1))

Diff for: src/main/scala/util/CreditedIO.scala

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ case class CreditedDelay(debit: Int, credit: Int)
3737
*/
3838
final class CreditedIO[T <: Data](gen: T) extends Bundle
3939
{
40-
override def cloneType: this.type = new CreditedIO(genType).asInstanceOf[this.type]
4140
def genType: T = gen
4241

4342
val credit = Input (Bool()) // 1: a credit is given to the sender by the receiver

Diff for: src/main/scala/util/HeterogeneousBag.scala

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ final case class HeterogeneousBag[T <: Data](elts: Seq[T]) extends Record with c
1212

1313
val elements = ListMap(elts.zipWithIndex.map { case (n,i) => (i.toString, n) }:_*)
1414
override def cloneType: this.type = (new HeterogeneousBag(elts.map(_.chiselCloneType))).asInstanceOf[this.type]
15-
1615
// IndexedSeq has its own hashCode/equals that we must not use
1716
override def hashCode: Int = super[Record].hashCode
1817
override def equals(that: Any): Boolean = super[Record].equals(that)

Diff for: src/main/scala/util/RationalCrossing.scala

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ final class RationalIO[T <: Data](gen: T) extends Bundle
5757
val ready = Input(Bool())
5858
val sink = Input(UInt(2.W))
5959

60-
override def cloneType: this.type = new RationalIO(gen).asInstanceOf[this.type]
6160
}
6261

6362
object RationalIO

Diff for: src/main/scala/util/ReadyValidCancel.scala

-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class ValidCancel[+T <: Data](gen: T) extends Bundle {
1919
val lateCancel = Output(Bool())
2020
val bits = Output(gen)
2121
def validQual(): Bool = earlyValid && !lateCancel
22-
override def cloneType: this.type = ValidCancel(gen).asInstanceOf[this.type]
2322

2423
/** Down-converts a ValidCancel output to a Valid bundle, dropping early/late timing split. */
2524
def andNotCancel(): Valid[T] = {
@@ -48,7 +47,6 @@ class ReadyValidCancel[+T <: Data](gen: T) extends ValidCancel(gen)
4847
val ready = Input(Bool())
4948
def mightFire(): Bool = ready && earlyValid
5049
def fire(): Bool = ready && validQual()
51-
override def cloneType: this.type = ReadyValidCancel(gen).asInstanceOf[this.type]
5250

5351
/** Down-converts a ReadyValidCancel output to a DecoupledIO bundle, dropping early/late timing split. */
5452
def asDecoupled(): DecoupledIO[T] = {

Diff for: src/main/scala/util/ReorderQueue.scala

-6
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,11 @@ class ReorderQueueWrite[T <: Data](dType: T, tagWidth: Int) extends Bundle {
99
val data = dType.cloneType
1010
val tag = UInt(width = tagWidth)
1111

12-
override def cloneType =
13-
new ReorderQueueWrite(dType, tagWidth).asInstanceOf[this.type]
1412
}
1513

1614
class ReorderEnqueueIO[T <: Data](dType: T, tagWidth: Int)
1715
extends DecoupledIO(new ReorderQueueWrite(dType, tagWidth)) {
1816

19-
override def cloneType =
20-
new ReorderEnqueueIO(dType, tagWidth).asInstanceOf[this.type]
2117
}
2218

2319
class ReorderDequeueIO[T <: Data](dType: T, tagWidth: Int) extends Bundle {
@@ -26,8 +22,6 @@ class ReorderDequeueIO[T <: Data](dType: T, tagWidth: Int) extends Bundle {
2622
val data = dType.cloneType.asOutput
2723
val matches = Bool(OUTPUT)
2824

29-
override def cloneType =
30-
new ReorderDequeueIO(dType, tagWidth).asInstanceOf[this.type]
3125
}
3226

3327
class ReorderQueue[T <: Data](dType: T, tagWidth: Int, size: Option[Int] = None)

0 commit comments

Comments
 (0)