object DataMirror
- Alphabetic
- By Inheritance
- DataMirror
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
HasMatchingZipOfChildren[T] extends AnyRef
Typeclass trait to use collectMembersOverMatches, collectMembersOverAll, collectMembersOverAllForAny, collectMembersOverAllForAnyFunction
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- implicit val AlignmentMatchingZipOfChildren: HasMatchingZipOfChildren[Alignment]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
checkAlignmentTypeEquivalence(x: Data, y: Data): Boolean
Check if two Chisel types have the same alignments for all matching members
Check if two Chisel types have the same alignments for all matching members
This means that for matching members in Aggregates, they must have matching member alignments relative to the parent type For matching non-aggregates, they must be the same alignment to their parent type.
- x
First Chisel type
- y
Second Chisel type
- returns
true if the two Chisel types have alignment type equivalence.
-
def
checkTypeEquivalence(x: Data, y: Data): Boolean
Check if two Chisel types are the same type.
Check if two Chisel types are the same type. Internally, this is dispatched to each Chisel type's
typeEquivalent
function for each type to determine if the types are intended to be equal.For most types, different parameters should ensure that the types are different. For example,
UInt(8.W)
andUInt(16.W)
are different. Likewise, Records check that both Records have the same elements with the same types.Equivalent to being structural, alignment, and width type equivalent
- x
First Chisel type
- y
Second Chisel type
- returns
true if the two Chisel types are equal.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
collectAlignedDeep[T](base: Data)(pf: PartialFunction[Data, T]): Seq[T]
Collects all members of base who are aligned w.r.t.
Collects all members of base who are aligned w.r.t. base Accepts a collector partial function, rather than a collector function
- T
Type of the component that will be collected
- base
Data from whom aligned members (w.r.t. base) are collected
-
def
collectFlippedDeep[T](base: Data)(pf: PartialFunction[Data, T]): Seq[T]
Collects all members of base who are flipped w.r.t.
Collects all members of base who are flipped w.r.t. base Accepts a collector partial function, rather than a collector function
- T
Type of the component that will be collected
- base
Data from whom flipped members (w.r.t. base) are collected
-
def
collectMembers[T](d: Data)(collector: PartialFunction[Data, T]): Iterable[T]
Collects all fields selected by collector within a data and all recursive children fields Accepts a collector partial function, rather than a collector function
Collects all fields selected by collector within a data and all recursive children fields Accepts a collector partial function, rather than a collector function
- T
Type of the component that will be collected
- collector
Collector partial function to pick which components to collect
-
def
collectMembersOverAll[D, T](left: D, right: D)(collector: PartialFunction[(Option[D], Option[D]), T])(implicit arg0: HasMatchingZipOfChildren[D]): Seq[T]
Collects over members left and right who have structurally corresponding members in either left and right Accepts a collector partial function, rather than a collector function
Collects over members left and right who have structurally corresponding members in either left and right Accepts a collector partial function, rather than a collector function
- T
Type of the thing being collected
- left
Data from whom members are collected
- right
Data from whom members are collected
- collector
Collector partial function to pick which components from left, right, or both to collect
-
def
collectMembersOverAllForAny[D, L, R](left: Option[D], right: Option[D])(pcollector: PartialFunction[(Option[D], Option[D]), (Option[L], Option[R])])(implicit arg0: HasMatchingZipOfChildren[D]): Seq[(Option[L], Option[R])]
Collects over members left and right who have structurally corresponding members in either left and right Can return an optional value for left, right, both or neither Accepts a collector partial function, rather than a collector function
Collects over members left and right who have structurally corresponding members in either left and right Can return an optional value for left, right, both or neither Accepts a collector partial function, rather than a collector function
- L
Type of the thing being collected from the left
- R
Type of the thing being collected from the right
- left
Data from whom members are collected
- right
Data from whom members are collected
-
def
collectMembersOverAllForAnyFunction[D, L, R](left: Option[D], right: Option[D])(collector: ((Option[D], Option[D])) ⇒ Option[(Option[L], Option[R])])(implicit arg0: HasMatchingZipOfChildren[D]): Seq[(Option[L], Option[R])]
Collects over members left and right who have structurally corresponding members in either left and right Can return an optional value for left, right, both or neither Accepts a full function
Collects over members left and right who have structurally corresponding members in either left and right Can return an optional value for left, right, both or neither Accepts a full function
- L
Type of the thing being collected from the left
- R
Type of the thing being collected from the right
- left
Data from whom members are collected
- right
Data from whom members are collected
- collector
Collector full function to pick which components from left, right, or both to collect
-
def
collectMembersOverMatches[D, T](left: D, right: D)(collector: PartialFunction[(D, D), T])(implicit arg0: HasMatchingZipOfChildren[D]): Seq[T]
Collects over members left and right who have structurally corresponding members in both left and right Accepts a collector partial function, rather than a collector function
Collects over members left and right who have structurally corresponding members in both left and right Accepts a collector partial function, rather than a collector function
- T
Type of the thing being collected
- left
Data from whom members are collected
- right
Data from whom members are collected
- collector
Collector partial function to pick which components from left and right to collect
- def directionOf(target: Data): ActualDirection
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fullModulePorts(target: BaseModule): Seq[(String, Data)]
Returns a recursive representation of a module's ports with underscore-qualified names
Returns a recursive representation of a module's ports with underscore-qualified names
class MyModule extends Module { val io = IO(new Bundle { val in = Input(UInt(8.W)) val out = Output(Vec(2, UInt(8.W))) }) val extra = IO(Input(UInt(8.W))) val delay = RegNext(io.in) io.out(0) := delay io.out(1) := delay + extra } val mod = Module(new MyModule) DataMirror.fullModulePorts(mod) // returns: Seq( // "clock" -> mod.clock, // "reset" -> mod.reset, // "io" -> mod.io, // "io_out" -> mod.io.out, // "io_out_0" -> mod.io.out(0), // "io_out_1" -> mod.io.out(1), // "io_in" -> mod.io.in, // "extra" -> mod.extra // )
- Note
The returned ports are redundant. An Aggregate port will be present along with all of its children.
- See also
DataMirror.modulePorts for a non-recursive representation of the ports.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getIntermediateAndLeafs(d: Data): Seq[Data]
Return all expanded components, including intermediate aggregate nodes
Return all expanded components, including intermediate aggregate nodes
- d
Component to find leafs if aggregate typed. Intermediate fields/indicies ARE included
-
def
getParent(target: BaseModule): Option[BaseModule]
Returns the parent module within which a module instance is instantiated
Returns the parent module within which a module instance is instantiated
- target
a module instance
- returns
the parent of the
target
, if one exists
- Note
Top-level modules in any given elaboration do not have a parent
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
isIO(x: Data): Boolean
Check if a given
Data
is an IO portCheck if a given
Data
is an IO port- x
the
Data
to check- returns
true
if x is an IO port,false
otherwise
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isReg(x: Data): Boolean
Check if a given
Data
is a RegCheck if a given
Data
is a Reg- x
the
Data
to check- returns
true
if x is a Reg,false
otherwise
-
def
isWire(x: Data): Boolean
Check if a given
Data
is a WireCheck if a given
Data
is a Wire- x
the
Data
to check- returns
true
if x is a Wire,false
otherwise
-
def
modulePorts(target: BaseModule): Seq[(String, Data)]
Returns the ports of a module
Returns the ports of a module
class MyModule extends Module { val io = IO(new Bundle { val in = Input(UInt(8.W)) val out = Output(Vec(2, UInt(8.W))) }) val extra = IO(Input(UInt(8.W))) val delay = RegNext(io.in) io.out(0) := delay io.out(1) := delay + extra } val mod = Module(new MyModule) DataMirror.modulePorts(mod) // returns: Seq( // "clock" -> mod.clock, // "reset" -> mod.reset, // "io" -> mod.io, // "extra" -> mod.extra // )
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
queryNameGuess(x: Data): String
Get an early guess for the name of this Data
Get an early guess for the name of this Data
Warning: it is not guaranteed that this name will end up in the output FIRRTL or Verilog.
Name guesses are not stable and may change due to a subsequent Data.suggestName or plugin-related naming. Name guesses are not necessarily legal Verilog identifiers. Name guesses for elements of Bundles or Records will include periods, and guesses for elements of Vecs will include square brackets.
- def specifiedDirectionOf(target: Data): SpecifiedDirection
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def widthOf(target: Data): Width
- object internal