Differences

This shows you the differences between two versions of the page.

Link to this comparison view

std:data [2022/07/17 06:42]
rajit created
std:data [2022/07/17 06:43] (current)
rajit
Line 4: Line 4:
  
 <code act> <code act>
-export template<pint N> +template<pint N> 
 deftype d1of <: enum<N> (bool?! d[N]); deftype d1of <: enum<N> (bool?! d[N]);
 </code> </code>
Line 10: Line 10:
  
 <code act> <code act>
-export deftype d1of2 <: d1of<2> (bool?! t, f);+deftype d1of2 <: d1of<2> (bool?! t, f);
 </code> </code>
 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. 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.
  
 <code act> <code act>
-export deftype dualrail <: d1of2();+deftype dualrail <: d1of2();
 </code> </code>
 Since the ''d1of2'' type is also commonly known as //dual-rail encoding//, this provides another name for the same type. Since the ''d1of2'' type is also commonly known as //dual-rail encoding//, this provides another name for the same type.
  
 <code act> <code act>
-export template<pint M>+template<pint M>
 deftype Mx1of2 <: int<M> (dualrail d[M]) deftype Mx1of2 <: int<M> (dualrail d[M])
 </code> </code>