The language provides 5 base types and 2 composite types that can be used.
- Base types :
Bool
,Bits
,UInt
for unsigned integers,SInt
for signed integers andEnum
. - Composite types :
Bundle
andVec
.
In addition to the base types Spinal supports Fixed point that is documented there and floating point that is actually under development there.
Finally, a special type is available for checking equality between a BitVector and a bits constant that contain hole (don’t care values). Below, there is an example :
val myBits = Bits(8 bits)
val itMatch = myBits === M"00--10--" // - don't care value