package dataview
- Alphabetic
- By Inheritance
- dataview
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait DataProduct[-A] extends AnyRef
Typeclass interface for getting elements of type Data
Typeclass interface for getting elements of type Data
This is needed for validating DataViews targeting type
A. Can be thought of as "can be the Target of a DataView".Chisel provides some implementations in object DataProduct that are available by default in the implicit scope.
- A
Type that has elements of type Data
- Annotations
- @implicitNotFound()
- See also
- sealed class DataView[T, V <: Data] extends AnyRef
Mapping between a target type
Tand a view typeVMapping between a target type
Tand a view typeVEnables calling
.viewAs[T]on instances of the target type.Detailed documentation
- T
Target type (must have an implementation of DataProduct)
- V
View type
- Annotations
- @implicitNotFound()
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 )
- See also
object DataView for factory methods
object PartialDataView for defining non-total
DataViews
Example: - implicit class DataViewable[T] extends AnyRef
Provides
viewAsfor types that have an implementation of DataProductProvides
viewAsfor types that have an implementation of DataProductCalling
viewAsalso requires an implementation of DataView for the target type - case class InvalidViewException(message: String) extends ChiselException with Product with Serializable
- sealed trait LowPriorityDataProduct extends AnyRef
Low priority built-in implementations of DataProduct
Low priority built-in implementations of DataProduct
- Note
This trait exists so that
dataDataProductcan be lower priority thanseqDataProductto resolve ambiguity
- implicit class RecordUpcastable[T <: Record] extends AnyRef
Provides
viewAsSupertypefor subclasses of Record
Value Members
- object DataProduct extends LowPriorityDataProduct
Encapsulating object for built-in implementations of DataProduct
Encapsulating object for built-in implementations of DataProduct
- Note
DataProduct implementations provided in this object are available in the implicit scope
- object DataView
Factory methods for constructing DataViews, see class for example use
- object PartialDataView
Factory methods for constructing non-total DataViews