diff options
Diffstat (limited to 'core/src/main')
| -rw-r--r-- | core/src/main/scala/chisel3/Aggregate.scala | 15 | ||||
| -rw-r--r-- | core/src/main/scala/chisel3/Bits.scala | 12 | ||||
| -rw-r--r-- | core/src/main/scala/chisel3/experimental/package.scala | 10 |
3 files changed, 8 insertions, 29 deletions
diff --git a/core/src/main/scala/chisel3/Aggregate.scala b/core/src/main/scala/chisel3/Aggregate.scala index fc9972aa..ab7fe53f 100644 --- a/core/src/main/scala/chisel3/Aggregate.scala +++ b/core/src/main/scala/chisel3/Aggregate.scala @@ -1072,13 +1072,7 @@ package experimental { * } * }}} */ -abstract class Bundle extends Record with experimental.AutoCloneType { - assert( - _usingPlugin, - "The Chisel compiler plugin is now required for compiling Chisel code. " + - "Please see https://github.com/chipsalliance/chisel3#build-your-own-chisel-projects." - ) - +abstract class Bundle extends Record { override def className: String = try { this.getClass.getSimpleName match { case name if name.startsWith("$anon$") => "AnonymousBundle" // fallback for anonymous Bundle case @@ -1217,13 +1211,6 @@ abstract class Bundle extends Record with experimental.AutoCloneType { case _ => None } - /** Indicates if a concrete Bundle class was compiled using the compiler plugin - * - * Used for optimizing Chisel's performance and testing Chisel itself - * @note This should not be used in user code! - */ - protected def _usingPlugin: Boolean = false - private def checkClone(clone: Bundle): Unit = { for ((name, field) <- elements) { if (clone.elements(name) eq field) { diff --git a/core/src/main/scala/chisel3/Bits.scala b/core/src/main/scala/chisel3/Bits.scala index c1c4c388..927b1c19 100644 --- a/core/src/main/scala/chisel3/Bits.scala +++ b/core/src/main/scala/chisel3/Bits.scala @@ -216,7 +216,7 @@ sealed abstract class Bits(private[chisel3] val width: Width) extends Element wi * @return this $coll with each bit inverted * @group Bitwise */ - def unary_~(): Bits + def unary_~ : Bits /** Static left shift operator * @@ -368,10 +368,10 @@ sealed class UInt private[chisel3] (width: Width) extends Bits(width) with Num[U * @group Arithmetic */ - def unary_-(): UInt = 0.U - this + def unary_- : UInt = 0.U - this - def unary_-%(): UInt = 0.U -% this + def unary_-% : UInt = 0.U -% this override def +(that: UInt): UInt = this +% that override def -(that: UInt): UInt = this -% that @@ -471,7 +471,7 @@ sealed class UInt private[chisel3] (width: Width) extends Bits(width) with Num[U def ^(that: UInt): UInt = binop(UInt(this.width.max(that.width)), BitXorOp, that) - def unary_~(): UInt = + def unary_~ : UInt = unop(UInt(width = width), BitNotOp) // REVIEW TODO: Can these be defined on Bits? @@ -807,7 +807,7 @@ sealed class SInt private[chisel3] (width: Width) extends Bits(width) with Num[S def ^(that: SInt): SInt = binop(UInt(this.width.max(that.width)), BitXorOp, that).asSInt - def unary_~(): SInt = + def unary_~ : SInt = unop(UInt(width = width), BitNotOp).asSInt override def <(that: SInt): Bool = @@ -1037,7 +1037,7 @@ sealed class Bool() extends UInt(1.W) with Reset { def ^(that: Bool): Bool = binop(Bool(), BitXorOp, that) - override def unary_~(): Bool = + override def unary_~ : Bool = unop(Bool(), BitNotOp) /** Logical or operator diff --git a/core/src/main/scala/chisel3/experimental/package.scala b/core/src/main/scala/chisel3/experimental/package.scala index 80c3e28a..6dc14afb 100644 --- a/core/src/main/scala/chisel3/experimental/package.scala +++ b/core/src/main/scala/chisel3/experimental/package.scala @@ -198,7 +198,6 @@ package object experimental { */ final class HWTuple2[+A <: Data, +B <: Data] private[chisel3] (val _1: A, val _2: B) extends Bundle() { // Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually - override protected def _usingPlugin: Boolean = true override protected def _cloneTypeImpl: Bundle = new HWTuple2(chiselTypeClone(_1), chiselTypeClone(_2)) } @@ -213,7 +212,6 @@ package object experimental { val _3: C) extends Bundle() { // Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually - override protected def _usingPlugin: Boolean = true override protected def _cloneTypeImpl: Bundle = new HWTuple3( chiselTypeClone(_1), chiselTypeClone(_2), @@ -233,7 +231,6 @@ package object experimental { val _4: D) extends Bundle() { // Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually - override protected def _usingPlugin: Boolean = true override protected def _cloneTypeImpl: Bundle = new HWTuple4( chiselTypeClone(_1), chiselTypeClone(_2), @@ -255,7 +252,6 @@ package object experimental { val _5: E) extends Bundle() { // Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually - override protected def _usingPlugin: Boolean = true override protected def _cloneTypeImpl: Bundle = new HWTuple5( chiselTypeClone(_1), chiselTypeClone(_2), @@ -279,7 +275,7 @@ package object experimental { val _6: F) extends Bundle() { // Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually - override protected def _usingPlugin: Boolean = true + override protected def _cloneTypeImpl: Bundle = new HWTuple6( chiselTypeClone(_1), chiselTypeClone(_2), @@ -313,7 +309,6 @@ package object experimental { val _7: G) extends Bundle() { // Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually - override protected def _usingPlugin: Boolean = true override protected def _cloneTypeImpl: Bundle = new HWTuple7( chiselTypeClone(_1), chiselTypeClone(_2), @@ -350,7 +345,6 @@ package object experimental { val _8: H) extends Bundle() { // Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually - override protected def _usingPlugin: Boolean = true override protected def _cloneTypeImpl: Bundle = new HWTuple8( chiselTypeClone(_1), chiselTypeClone(_2), @@ -390,7 +384,6 @@ package object experimental { val _9: I) extends Bundle() { // Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually - override protected def _usingPlugin: Boolean = true override protected def _cloneTypeImpl: Bundle = new HWTuple9( chiselTypeClone(_1), chiselTypeClone(_2), @@ -433,7 +426,6 @@ package object experimental { val _10: J) extends Bundle() { // Because this implementation exists in chisel3.core, it cannot compile with the plugin, so we implement the behavior manually - override protected def _usingPlugin: Boolean = true override protected def _cloneTypeImpl: Bundle = new HWTuple10( chiselTypeClone(_1), chiselTypeClone(_2), |
