implicit class LiteralBuilder extends AnyRef
Literal builder
S/U/B"[[size']base]value"
e.g.:
B"8'xFF"`
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- LiteralBuilder
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new LiteralBuilder(sc: StringContext)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
B(args: Any*): Bits
Create a
Bits
hardware literal.Create a
Bits
hardware literal.val myBits1 = B"8'xFF" // Base could be x,h (base 16) // d (base 10) // o (base 8) // b (base 2) val myBits2 = B"1001_0011" // _ can be used for readability
- See also
Example: - def BS(args: Any*): BigInt
- def BU(args: Any*): BigInt
- def Bits(args: Any*): Bits
- def L(args: Any*): Seq[Any]
-
def
M(args: Any*): MaskedLiteral
Create a mask hardware literal.
Create a mask hardware literal.
Useful for don't care comparisons.
val myBits = B"1101" val test1 = myBits === M"1-01" // True val test2 = myBits === M"0---" // False val test3 = myBits === M"1--1" // True
- See also
Example: -
def
S(args: Any*): SInt
Create a
SInt
hardware literal.Create a
SInt
hardware literal.mySInt := S"0000_0101" // Base per default is binary => 5 mySInt := S"h1A" // Base could be x (base 16) // h (base 16) // d (base 10) // o (base 8) // b (base 2) mySInt := S"8'h1A"
- See also
Example: - def SInt(args: Any*): SInt
-
def
U(args: Any*): UInt
Create a
UInt
hardware literal.Create a
UInt
hardware literal.myUInt := U"0000_0101" // Base per default is binary => 5 myUInt := U"h1A" // Base could be x (base 16) // h (base 16) // d (base 10) // o (base 8) // b (base 2) myUInt := U"8'h1A"
- See also
Example: - def UInt(args: Any*): UInt
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated