The UInt type is an unsigned fixed width representation of an integer value where n indicates the number of bits. UInt#(n) Usage
ExamplesUInt#(8) a = 'h80; UInt#(12) b = zeroExtend(a); // b => 'h080 UInt#(8) c = truncate(b); // c => 'h80 Data Type Conversion FunctionsBluespec provides a set of functions to convert a type between Bool and another type. During type checking, the compiler resolves these functions to a particular type instance. If you have excessive type conversion in your design, it usually indicates a poor choice of the basic object types in the design, and you may want to review your type choices. These conversion utilities do not incur logic overhead. |
Learning BSV > Data Types >