clash-prelude-0.5.1: CAES Language for Synchronous Hardware - Prelude library

Safe HaskellNone
LanguageHaskell2010

CLaSH.Class.BitVector

Synopsis

Documentation

class BitVector a where Source

Convert types from and to a Vector of Bits

Associated Types

type BitSize a :: Nat Source

Number of Bits needed to represents elements of type a

Methods

toBV :: KnownNat (BitSize a) => a -> Vec (BitSize a) Bit Source

Convert element of type a to a Vec of Bits

fromBV :: KnownNat (BitSize a) => Vec (BitSize a) Bit -> a Source

Convert a Vec of Bits to an element of type a

Instances