Lookupable

chisel3.experimental.hierarchy.core.Lookupable
See theLookupable companion object
trait Lookupable[-B]

Typeclass used to recontextualize values from an original Definition to an Instance

Implementations for Chisel types and other common Scala types are provided in the companion object. Users can define Lookupable for their own types.

Attributes

Example
case class Foo[T <: Data](name: String, data: T)
object Foo {
 implicit def lookupable[T <: Data]: Lookupable.Simple[Foo[T]] =
   Lookupable.product2[Foo[T], String, T](
     x => (x.name, x.data),
     Foo.apply
   )
}
Companion
object
Source
Lookupable.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class SimpleLookupable[X]

Members list

Type members

Types

type C

Attributes

Source
Lookupable.scala

Value members

Abstract methods

def definitionLookup[A](that: A => B, definition: Definition[A]): C

Function called to modify the returned value of type B from A, into C

Function called to modify the returned value of type B from A, into C

Value parameters

definition

Definition of A, used to determine C's context

that

function that selects B from A

Attributes

Source
Lookupable.scala
def instanceLookup[A](that: A => B, instance: Instance[A]): C

Function called to modify the returned value of type B from A, into C

Function called to modify the returned value of type B from A, into C

Value parameters

instance

Instance of A, used to determine C's context

that

function that selects B from A

Attributes

Source
Lookupable.scala