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
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
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"
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"
(Since version ) see corresponding Javadoc for more information.
Literal builder
S/U/B"[[size']base]value"
e.g.:
B"8'xFF"`