chisel3.experimental.dataview

Members list

Type members

Classlikes

trait DataProduct[-A]

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.

Type parameters

A

Type that has elements of type Data

Attributes

See also
Companion
object
Source
DataProduct.scala
Supertypes
class Object
trait Matchable
class Any

Encapsulating object for built-in implementations of DataProduct

Encapsulating object for built-in implementations of DataProduct

Attributes

Note

DataProduct implementations provided in this object are available in the implicit scope

Companion
trait
Source
DataProduct.scala
Supertypes
class Object
trait Matchable
class Any
Self type
sealed class DataView[T, V <: Data]

Mapping between a target type T and a view type V

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
Supertypes
class Object
trait Matchable
class Any
object DataView

Factory methods for constructing DataViews, see class for example use

Factory methods for constructing DataViews, see class for example use

Attributes

Companion
class
Source
DataView.scala
Supertypes
class Object
trait Matchable
class Any
Self type
DataView.type
implicit class DataViewable[T](target: T)

Provides viewAs for types that have an implementation of DataProduct

Provides viewAs for types that have an implementation of DataProduct

Calling viewAs also requires an implementation of DataView for the target type

Attributes

Source
package.scala
Supertypes
class Object
trait Matchable
class Any
case class InvalidViewException(message: String) extends ChiselException

Attributes

Source
package.scala
Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
sealed trait LowPriorityDataProduct

Low priority built-in implementations of DataProduct

Low priority built-in implementations of DataProduct

Attributes

Note

This trait exists so that dataDataProduct can be lower priority than iterableDataProduct to resolve ambiguity

Source
DataProduct.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object DataProduct

Factory methods for constructing non-total DataViews

Factory methods for constructing non-total DataViews

Attributes

Source
DataView.scala
Supertypes
class Object
trait Matchable
class Any
Self type
implicit class RecordUpcastable[T <: Record](target: T)

Provides viewAsSupertype for subclasses of Record

Provides viewAsSupertype for subclasses of Record

Attributes

Source
package.scala
Supertypes
class Object
trait Matchable
class Any

Implicits

Implicits

final implicit def DataViewable[T](target: T): DataViewable[T]

Provides viewAs for types that have an implementation of DataProduct

Provides viewAs for types that have an implementation of DataProduct

Calling viewAs also requires an implementation of DataView for the target type

Attributes

Source
package.scala
final implicit def RecordUpcastable[T <: Record](target: T): RecordUpcastable[T]

Provides viewAsSupertype for subclasses of Record

Provides viewAsSupertype for subclasses of Record

Attributes

Source
package.scala