Skip to content

Commit

Permalink
Deprecate all Injecting Aspect Code (backport #4415) (#4416)
Browse files Browse the repository at this point in the history
Deprecate injecting aspect code as of Chisel 6.6.0.  These were planned to
be deprecated some time ago (see ROADMAP.md).  However, these had a long
user in @sequencer.  He is now off of these and there is nothing blocking
their removal.

For similar, verification-focused functionality can be selectively added
to the circuit, use layers.

(cherry picked from commit d292a5e)

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
  • Loading branch information
mergify[bot] authored Sep 27, 2024
1 parent d46fcc8 commit 39ec860
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ lazy val warningSuppression = Seq(
// This is deprecated for external users but not internal use
"cat=deprecation&origin=firrtl\\.options\\.internal\\.WriteableCircuitAnnotation:s",
"cat=deprecation&origin=chisel3\\.util\\.experimental\\.BoringUtils.*:s",
"cat=deprecation&origin=chisel3\\.ltl.*:s"
"cat=deprecation&origin=chisel3\\.ltl.*:s",
// This is deprecated and planned to be removed
"cat=deprecation&origin=chisel3\\.aop\\.injecting.*:s",
"cat=deprecation&origin=chisel3\\.stage\\.phases\\.MaybeInjectingPhase:s",
"cat=deprecation&origin=chisel3\\.ModuleAspect:s"
).mkString(",")
)

Expand Down
1 change: 1 addition & 0 deletions core/src/main/scala/chisel3/ModuleAspect.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import chisel3.internal.{Builder, PseudoModule}
*
* @param module Module for which this object is an aspect of
*/
@deprecated("injecting aspects are being removed in Chisel 7", "6.6.0")
abstract class ModuleAspect private[chisel3] (module: RawModule) extends RawModule with PseudoModule {

Builder.addAspect(module, this)
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/chisel3/aop/injecting/InjectStatement.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import firrtl.annotations.{Annotation, ModuleTarget, NoTargetAnnotation, SingleT
* @param modules Additional modules that may be instantiated by s
* @param annotations Additional annotations that should be passed down compiler
*/
@deprecated("injecting aspects are being removed in Chisel 7", "6.6.0")
case class InjectStatement(
module: ModuleTarget,
s: firrtl.ir.Statement,
Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/chisel3/aop/injecting/InjectingAspect.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import scala.collection.mutable.ArrayBuffer
* @tparam T Type of top-level module
* @tparam M Type of root module (join point)
*/
@deprecated("injecting aspects are being removed in Chisel 7", "6.6.0")
case class InjectingAspect[T <: RawModule, M <: RawModule](
selectRoots: T => Iterable[M],
injection: M => Unit)
Expand All @@ -41,6 +42,7 @@ case class InjectingAspect[T <: RawModule, M <: RawModule](
* @tparam T Type of top-level module
* @tparam M Type of root module (join point)
*/
@deprecated("injecting aspects are being removed in Chisel 7", "6.6.0")
abstract class InjectorAspect[T <: RawModule, M <: RawModule](
selectRoots: T => Iterable[M],
injection: M => Unit)
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/chisel3/aop/injecting/InjectingPhase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import scala.collection.mutable
*
* Consumes the [[chisel3.stage.DesignAnnotation]] and converts every [[Aspect]] into their annotations prior to executing FIRRTL
*/
@deprecated("injecting aspects are being removed in Chisel 7", "6.6.0")
class InjectingPhase extends Phase {
def transform(annotations: AnnotationSeq): AnnotationSeq = {
val addStmtMap = mutable.HashMap[String, Seq[ir.Statement]]()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import firrtl.options.Phase

/** Run `InjectingPhase` if a `InjectStatement` is present.
*/
@deprecated("injecting aspects are being removed in Chisel 7", "6.6.0")
class MaybeInjectingPhase extends Phase {
override def prerequisites = Seq.empty
override def optionalPrerequisites = Seq.empty
Expand Down

0 comments on commit 39ec860

Please sign in to comment.