ChiselSubtypeOf

chisel3.experimental.ChiselSubtypeOf
See theChiselSubtypeOf companion object
sealed trait ChiselSubtypeOf[A, B]

Enforces that A is a Chisel subtype of B.

A is a Chisel subtype of B if A contains all of B's fields (same names and same types). Only public fields that are subtypes of chisel3.Data are considered when checking for containment.

In the following example A is a Chisel subtype of B:

  class A extends Bundle {
    val x = UInt(3.W)
    val y = UInt(3.W)
    val z = UInt(3.W)
  }
  class B extends Bundle {
    val x = UInt(3.W)
    val y = UInt(3.W)
  }

Attributes

Companion
object
Source
ChiselSubtypeOf.scala
Graph
Supertypes
class Object
trait Matchable
class Any
In this article