Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate more Aspect parts (backport #4420) #4421

Merged
merged 1 commit into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ lazy val warningSuppression = Seq(
// 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"
"cat=deprecation&origin=chisel3\\.ModuleAspect:s",
"cat=deprecation&origin=chisel3\\.aop\\.inspecting.*:s",
"cat=deprecation&origin=chisel3\\.aop\\.Aspect:s",
"cat=deprecation&origin=chisel3\\.aop\\.Aspect$:s",
"cat=deprecation&origin=chisel3\\.stage\\.phases.AspectPhase:s",
"cat=deprecation&origin=chisel3\\.stage\\.phases.MaybeAspectPhase:s"
).mkString(",")
)

Expand Down
3 changes: 3 additions & 0 deletions core/src/main/scala/chisel3/aop/Aspect.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import firrtl.AnnotationSeq
* what behavior should be done to instance, via the FIRRTL Annotation Mechanism
* @tparam T Type of top-level module
*/
@deprecated("aspects are being removed in Chisel 7", "6.6.0")
abstract class Aspect[T <: RawModule] extends Annotation with Unserializable with NoTargetAnnotation {

/** variable to save [[AnnotationSeq]] from [[chisel3.stage.phases.AspectPhase]]
Expand All @@ -35,12 +36,14 @@ abstract class Aspect[T <: RawModule] extends Annotation with Unserializable wit
}

/** Holds utility functions for Aspect stuff */
@deprecated("aspects are being removed in Chisel 7", "6.6.0")
object Aspect {

/** Converts elaborated Chisel components to FIRRTL modules
* @param chiselIR
* @return
*/
@deprecated("aspects are being removed in Chisel 7", "6.6.0")
def getFirrtl(chiselIR: chisel3.internal.firrtl.ir.Circuit): firrtl.ir.Circuit = {
chisel3.internal.firrtl.Converter.convert(chiselIR)
}
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/chisel3/aop/AspectLibrary.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import firrtl.options.{OptionsException, RegisteredLibrary, ShellOption}
/** Enables adding aspects to a design from the commandline, e.g.
* sbt> runMain chisel3.stage.ChiselMain --module <module> --with-aspect <aspect>
*/
@deprecated("aspects are being removed in Chisel 7", "6.6.0")
final class AspectLibrary() extends RegisteredLibrary {
val name = "AspectLibrary"

Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/chisel3/aop/inspecting/InspectingAspect.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ import firrtl.AnnotationSeq
* @param inspect Given top-level design, print things and return nothing
* @tparam T Type of top-level module
*/
@deprecated("aspects are being removed in Chisel 7", "6.6.0")
case class InspectingAspect[T <: RawModule](inspect: T => Unit) extends InspectorAspect[T](inspect)

/** Extend to make custom inspections of an elaborated design and printing out results
*
* @param inspect Given top-level design, print things and return nothing
* @tparam T Type of top-level module
*/
@deprecated("aspects are being removed in Chisel 7", "6.6.0")
abstract class InspectorAspect[T <: RawModule](inspect: T => Unit) extends Aspect[T] {
override def toAnnotation(top: T): AnnotationSeq = {
inspect(top)
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/chisel3/stage/phases/AspectPhase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import scala.collection.mutable
*
* Consumes the [[chisel3.stage.DesignAnnotation]] and converts every `Aspect` into their annotations prior to executing FIRRTL
*/
@deprecated("aspects are being removed in Chisel 7", "6.6.0")
class AspectPhase extends Phase {
def transform(annotations: AnnotationSeq): AnnotationSeq = {
var dut: Option[RawModule] = None
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/chisel3/stage/phases/MaybeAspectPhase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import firrtl.options.{Dependency, Phase}

/** Run [[AspectPhase]] if a [[chisel3.aop.Aspect]] is present.
*/
@deprecated("aspects are being removed in Chisel 7", "6.6.0")
class MaybeAspectPhase extends Phase {

override def prerequisites = Seq(Dependency[Elaborate])
Expand Down
Loading