chisel3.experimental.dataview.DataView
See theDataView companion object
Mapping between a target type T and a view type V
Enables calling .viewAs[T] on instances of the target type.
==Detailed documentation==
Type parameters
- T
-
Target type (must have an implementation of DataProduct)
- V
-
View type
Attributes
- See also
-
object DataView for factory methods
object PartialDataView for defining non-total
DataViews - Example
-
class Foo(val w: Int) extends Bundle { val a = UInt(w.W) } class Bar(val w: Int) extends Bundle { val b = UInt(w.W) } // DataViews are created using factory methods in the companion object implicit val view = DataView[Foo, Bar]( // The first argument is a function constructing a Foo from a Bar foo => new Bar(foo.w) // The remaining arguments are a variable number of field pairings _.a -> _.b ) - Companion
- object
- Source
- DataView.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article