Namespace std::data
This namespace contains standard names for commonly used data encodings in asynchronous circuits.
template<pint N> deftype d1of <: enum<N> (bool?! d[N]);
This data-type specifies a one-of-N
encoding (a.k.a. a one-hot encoded value). The all zero/false state is used to indicate an neutral value (i.e. the absence of data). The d[]
array corresponds to the data wires/rails.
deftype d1of2 <: d1of<2> (bool?! t, f);
This type contains a special name for a one-of-two encoding, with additional signals t
and f
used as the true and false wires/rails.
deftype dualrail <: d1of2();
Since the d1of2
type is also commonly known as dual-rail encoding, this provides another name for the same type.
template<pint M> deftype Mx1of2 <: int<M> (dualrail d[M])
This defines an M
-bit dual-rail encoding. It contains an array of data bits d[]
, each of which are of type dualrail
.