sealed abstract class Printable extends AnyRef
Superclass of things that can be printed in the resulting circuit
Usually created using the custom string interpolator p"...". Printable string interpolation is
similar to String
interpolation in Scala For example:
printf(p"The value of wire = $wire\n")This is equivalent to writing:
printf("The value of wire = %d\n", wire)All Chisel data types have a method .toPrintable that gives a default pretty print that can be
accessed via p"...". This works even for aggregate types, for example:
val myVec = VecInit(5.U, 10.U, 13.U) printf(p"myVec = $myVec\n") // myVec = Vec(5, 10, 13) val myBundle = Wire(new Bundle { val foo = UInt() val bar = UInt() }) myBundle.foo := 3.U myBundle.bar := 11.U printf(p"myBundle = $myBundle\n") // myBundle = Bundle(a -> 3, b -> 11)
Users can override the default behavior of .toPrintable in custom Bundle and Record
types.
- Source
- Printable.scala
- Alphabetic
- By Inheritance
- Printable
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def +(that: String): Printables
Allow for appending Strings to Printables
- final def +(that: Printable): Printables
Allow for appending Printables like Strings
- def ->[B](y: B): (Printable, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def ensuring(cond: (Printable) => Boolean, msg: => Any): Printable
- def ensuring(cond: (Printable) => Boolean): Printable
- def ensuring(cond: Boolean, msg: => Any): Printable
- def ensuring(cond: Boolean): Printable
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Shadowed Implicit Value Members
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from Printable toany2stringadd[Printable] performed by method any2stringadd in scala.Predef.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(printable: any2stringadd[Printable]).+(other)
- Definition Classes
- any2stringadd
Deprecated Value Members
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from Printable toStringFormat[Printable] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)instead ofvalue.formatted(formatString), or use thef""string interpolator. In Java 15 and later,formattedresolves to the new method in String which has reversed parameters.
- def →[B](y: B): (Printable, B)
- Implicit
- This member is added by an implicit conversion from Printable toArrowAssoc[Printable] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.