summaryrefslogtreecommitdiff
path: root/src/main/scala
diff options
context:
space:
mode:
authorMegan Wachs2021-10-05 10:27:18 -0700
committerGitHub2021-10-05 17:27:18 +0000
commitce15ad50a5c175db06c3bba5e3bf46b6c5466c47 (patch)
treebcec55dbb92bc827b3d3ec973481baa4d380c489 /src/main/scala
parent790a1806c7c5333cea15abbd2657fa893beb92c9 (diff)
Remove all Bundle cloneTypes and chiselRuntimeDeprecate its use (#2052)
* Remove all manual cloneTypes and make it chisel runtime deprecated to add one * runtime deprecate cloneType with runtime reflection * [Backport this commit] Bundle: add check that override def cloneType still works (will be made an error later) * Plugin: make it an error to override cloneType and add a test for that * Docs: can't compile the cloneType anymore * BundleSpec: comment out failing test I cannot get to fail or ignore Co-authored-by: Jack Koenig <koenig@sifive.com>
Diffstat (limited to 'src/main/scala')
-rw-r--r--src/main/scala/chisel3/util/BitPat.scala1
-rw-r--r--src/main/scala/chisel3/util/Decoupled.scala6
-rw-r--r--src/main/scala/chisel3/util/Enum.scala1
-rw-r--r--src/main/scala/chisel3/util/Valid.scala2
4 files changed, 0 insertions, 10 deletions
diff --git a/src/main/scala/chisel3/util/BitPat.scala b/src/main/scala/chisel3/util/BitPat.scala
index 0dcb2466..d607be4f 100644
--- a/src/main/scala/chisel3/util/BitPat.scala
+++ b/src/main/scala/chisel3/util/BitPat.scala
@@ -4,7 +4,6 @@ package chisel3.util
import scala.language.experimental.macros
import chisel3._
-import chisel3.internal.chiselRuntimeDeprecated
import chisel3.internal.sourceinfo.{SourceInfo, SourceInfoTransform}
diff --git a/src/main/scala/chisel3/util/Decoupled.scala b/src/main/scala/chisel3/util/Decoupled.scala
index 8909ffe3..0e05d114 100644
--- a/src/main/scala/chisel3/util/Decoupled.scala
+++ b/src/main/scala/chisel3/util/Decoupled.scala
@@ -82,9 +82,6 @@ object ReadyValidIO {
* @param gen the type of data to be wrapped in DecoupledIO
*/
class DecoupledIO[+T <: Data](gen: T) extends ReadyValidIO[T](gen)
-{
- override def cloneType: this.type = new DecoupledIO(gen).asInstanceOf[this.type]
-}
/** This factory adds a decoupled handshaking protocol to a data bundle. */
object Decoupled
@@ -123,9 +120,6 @@ object Decoupled
* @param gen the type of data to be wrapped in IrrevocableIO
*/
class IrrevocableIO[+T <: Data](gen: T) extends ReadyValidIO[T](gen)
-{
- override def cloneType: this.type = new IrrevocableIO(gen).asInstanceOf[this.type]
-}
/** Factory adds an irrevocable handshaking protocol to a data bundle. */
object Irrevocable
diff --git a/src/main/scala/chisel3/util/Enum.scala b/src/main/scala/chisel3/util/Enum.scala
index bf150464..4501a2de 100644
--- a/src/main/scala/chisel3/util/Enum.scala
+++ b/src/main/scala/chisel3/util/Enum.scala
@@ -6,7 +6,6 @@
package chisel3.util
import chisel3._
-import chisel3.internal.chiselRuntimeDeprecated
/** Defines a set of unique UInt constants
*
diff --git a/src/main/scala/chisel3/util/Valid.scala b/src/main/scala/chisel3/util/Valid.scala
index 6c6d685e..838d43ca 100644
--- a/src/main/scala/chisel3/util/Valid.scala
+++ b/src/main/scala/chisel3/util/Valid.scala
@@ -29,8 +29,6 @@ class Valid[+T <: Data](gen: T) extends Bundle {
* @return a Chisel [[Bool]] true if `valid` is asserted
*/
def fire(dummy: Int = 0): Bool = valid
-
- override def cloneType: this.type = Valid(gen).asInstanceOf[this.type]
}
/** Factory for generating "valid" interfaces. A "valid" interface is a data-communicating interface between a producer