The Bluespec environment provides many abstractions and polymorphic
data types in its library. A few common ones are listed here, since
they have high correlation to common (hardware) design paradigms.
- Maybe: The Maybe type encapsulates any data type a with a valid bit and further provides some functions to test the valid bit and extract the data.
- Vector:
A Vector is a container of a specific length holding elements of one
type. To use this type the Vector package must be imported.
- Tuple:
A tuple provides an unnamed data structure typically used to hold a
small number of related fields. Like other SystemVerilog constructs,
tuples are polymorphic, that is, they are parameterized on the types of
data they hold. Tuples are typically found as return values from
functions when more than one value must be returned.
|
|