SizeOf

chisel3.util.circt.SizeOf
object SizeOf

Attributes

Source
SizeOf.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
SizeOf.type

Members list

Value members

Concrete methods

def apply[T <: Data](gen: T): Data

Creates an intrinsic which returns the size of a type. The returned size is after width inference, so you can use this to compute expressions based on the inferred size of types.

Creates an intrinsic which returns the size of a type. The returned size is after width inference, so you can use this to compute expressions based on the inferred size of types.

Attributes

Example
val a = Wire(UInt())
a := 1 << (SizeOf(a) - 1)
Source
SizeOf.scala