DataMirror
Attributes
- Source
- DataMirror.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
DataMirror.type
Members list
Type members
Classlikes
Typeclass trait to use collectMembersOverMatches, collectMembersOverAll, collectMembersOverAllForAny, collectMembersOverAllForAnyFunction
Typeclass trait to use collectMembersOverMatches, collectMembersOverAll, collectMembersOverAllForAny, collectMembersOverAllForAnyFunction
Attributes
- Source
- DataMirror.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Source
- DataMirror.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
internal.type
Value members
Concrete methods
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.
Value parameters
- x
-
First Chisel type
- y
-
Second Chisel type
Attributes
- Returns
-
true if the two Chisel types have alignment type equivalence.
- Source
- DataMirror.scala
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.
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) and UInt(16.W) are different. Likewise, Records check that both Records have the same elements with the same types.
elements must be the same 'probe-ness' (RWProbe and Probe vs no Probe are not) and the same color.
Equivalent to being structural, alignment, width, probe, color type equivalent
Value parameters
- x
-
First Chisel type
- y
-
Second Chisel type
Attributes
- Returns
-
true if the two Chisel types are equal.
- Source
- DataMirror.scala
Collects all members of base who are aligned w.r.t. base Accepts a collector partial function, rather than a collector function
Collects all members of base who are aligned w.r.t. base Accepts a collector partial function, rather than a collector function
Type parameters
- T
-
Type of the component that will be collected
Value parameters
- base
-
Data from whom aligned members (w.r.t. base) are collected
- collector
-
Collector partial function to pick which components to collect
Attributes
- Source
- DataMirror.scala
Recursively collect all expanded member components of a data component, including intermediate aggregate nodes
Recursively collect all expanded member components of a data component, including intermediate aggregate nodes
Value parameters
- d
-
Data component to recursively collect components.
Attributes
- Returns
-
All member components; intermediate fields/indices ARE included
- Source
- DataMirror.scala
Collects all members of base who are flipped w.r.t. base Accepts a collector partial function, rather than a collector function
Collects all members of base who are flipped w.r.t. base Accepts a collector partial function, rather than a collector function
Type parameters
- T
-
Type of the component that will be collected
Value parameters
- base
-
Data from whom flipped members (w.r.t. base) are collected
- collector
-
Collector partial function to pick which components to collect
Attributes
- Source
- DataMirror.scala
Recursively collect just the leaf components of a data component's children (i.e. anything that isn't a Record or a Vec, but an Element). Probes of aggregates are also considered leaves.
Recursively collect just the leaf components of a data component's children (i.e. anything that isn't a Record or a Vec, but an Element). Probes of aggregates are also considered leaves.
Value parameters
- d
-
Data component to recursively collect leaf components.
Attributes
- Returns
-
All
Elementcomponents; intermediate fields/indices are not included - Source
- DataMirror.scala
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
Type parameters
- T
-
Type of the component that will be collected
Value parameters
- collector
-
Collector partial function to pick which components to collect
- data
-
Data to collect fields, as well as all children datas it directly and indirectly instantiates
Attributes
- Source
- DataMirror.scala
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
Type parameters
- T
-
Type of the thing being collected
Value parameters
- collector
-
Collector partial function to pick which components from left, right, or both to collect
- left
-
Data from whom members are collected
- right
-
Data from whom members are collected
Attributes
- Source
- DataMirror.scala
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
Type parameters
- L
-
Type of the thing being collected from the left
- R
-
Type of the thing being collected from the right
Value parameters
- collector
-
Collector partial function to pick which components from left, right, or both to collect
- left
-
Data from whom members are collected
- right
-
Data from whom members are collected
Attributes
- Source
- DataMirror.scala
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
Type parameters
- L
-
Type of the thing being collected from the left
- R
-
Type of the thing being collected from the right
Value parameters
- collector
-
Collector full function to pick which components from left, right, or both to collect
- left
-
Data from whom members are collected
- right
-
Data from whom members are collected
Attributes
- Source
- DataMirror.scala
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
Type parameters
- T
-
Type of the thing being collected
Value parameters
- collector
-
Collector partial function to pick which components from left and right to collect
- left
-
Data from whom members are collected
- right
-
Data from whom members are collected
Attributes
- Source
- DataMirror.scala
Attributes
- Source
- DataMirror.scala
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
// )
Attributes
- See also
-
DataMirror.modulePortsfor a non-recursive representation of the ports. - Note
-
The returned ports are redundant. An Aggregate port will be present along with all of its children.
- Source
- DataMirror.scala
Returns a recursive representation of an chisel3.experimental.hierarchy.Instance of a module's ports with underscore-qualified names.
Returns a recursive representation of an chisel3.experimental.hierarchy.Instance of a module's ports with underscore-qualified names.
Attributes
- See also
-
DataMirror.modulePortsfor a non-recursive representation of the ports. - Note
-
The returned ports are redundant. An Aggregate port will be present along with all of its children.
- Source
- DataMirror.scala
Return the optional layer color of a Data.
Return the optional layer color of a Data.
Value parameters
- x
-
the
Datato examine
Attributes
- Returns
-
a
Some[Layer]if the data has a layer color,Noneotherwise - Source
- DataMirror.scala
Returns the parent module within which a module instance is instantiated
Returns the parent module within which a module instance is instantiated
Value parameters
- target
-
a module instance
Attributes
- Returns
-
the parent of the
target, if one exists - Note
-
Top-level modules in any given elaboration do not have a parent
- Source
- DataMirror.scala
Returns true if target has been Flipped or Input directly
Check if a given Data is a Probe
Check if a given Data is a Probe
Value parameters
- x
-
the
Datato check
Attributes
- Returns
-
trueif x is a Probe,falseotherwise - Source
- DataMirror.scala
Check if the given Data is fully aligned w.r.t base. Chisel version of FIRRTL "passive". All Data are considered fully aligned to themselves regardless of their specified direction or relevant coerced directions of their parents. See collectFlippedDeep.
Check if the given Data is fully aligned w.r.t base. Chisel version of FIRRTL "passive". All Data are considered fully aligned to themselves regardless of their specified direction or relevant coerced directions of their parents. See collectFlippedDeep.
Value parameters
- base
-
Data to check full alignment for and relative to
Attributes
- Returns
-
trueif Data is fully aligned,falseotherwise. - Source
- DataMirror.scala
Check if a given Data is an IO port
Check if a given Data is an IO port
Value parameters
- x
-
the
Datato check
Attributes
- Returns
-
trueif x is an IO port,falseotherwise - Source
- DataMirror.scala
Check if a given Data is a Property
Check if a given Data is a Property
Value parameters
- x
-
the
Datato check
Attributes
- Returns
-
trueif x is a Property,falseotherwise - Source
- DataMirror.scala
Check if a given Data is a Reg
Check if a given Data is a Reg
Value parameters
- x
-
the
Datato check
Attributes
- Returns
-
trueif x is a Reg,falseotherwise - Source
- DataMirror.scala
Check if a given Data is visible from the current context
Check if a given Data is visible from the current context
Value parameters
- x
-
the
Datato check
Attributes
- Returns
-
trueif x is visible,falseotherwise - Source
- DataMirror.scala
Check if a given Data is a Wire
Check if a given Data is a Wire
Value parameters
- x
-
the
Datato check
Attributes
- Returns
-
trueif x is a Wire,falseotherwise - Source
- DataMirror.scala
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
// )
Attributes
- Source
- DataMirror.scala
Returns the ports of a chisel3.experimental.hierarchy.Instance of a module
Returns the ports of a chisel3.experimental.hierarchy.Instance of a module
Attributes
- Source
- DataMirror.scala
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.
Attributes
- Source
- DataMirror.scala
Require that two things are type equivalent
Require that two things are type equivalent
If they are not, print a helpful error message as to why not.
Requires structural, alignment, width, probe, color type equivalent
Value parameters
- message
-
if they are not type equivalent, contextual message to add to the exception thrown
- x
-
First Chisel type
- y
-
Second chisel type
Attributes
- Source
- DataMirror.scala
Attributes
- Source
- DataMirror.scala
Attributes
- Source
- DataMirror.scala
Deprecated methods
Attributes
- Deprecated
- Use DataMirror.collectAllMembers instead
- Source
- DataMirror.scala
Attributes
- Deprecated
- Use DataMirror.collectLeafMembers instead
- Source
- DataMirror.scala
Implicits
Implicits
Attributes
- Source
- DataMirror.scala
Attributes
- Source
- DataMirror.scala