## 简介(Introduction) SpinalHDL语言提供了五种基本数据类型和两种复合类型。 + 基础类型:Bool, Bits, UInt无符号整型, SInt有符号整型, Enum + 复合类型:Bundle和Vec ![数据类型](../../img/types.svg) 除了这些基础类型, Spinal还提供了以下的拓展: + Fixed-point数(部分支持) + Floating-point数(实验支持) 最后, 还有一种特殊类型能够检查BitVector和bit常量是否相等, 且可以添加无效位。如下所示: ```Scala val myBits = Bits(8 bits) val itMatch = myBits === M"00--10--“ // - 为无效位 ``` Verilog ```Verilog wire [7:0] myBits; wire itMatch; assign itMatch = ((myBits & 8'hcc) == 8'h08); ```