Copyright | (C) 2013-2016, University of Twente |
---|---|
License | BSD2 (see the file LICENSE) |
Maintainer | Christiaan Baaij <christiaan.baaij@gmail.com> |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Extensions |
|
Documentation
>>>
:set -XDataKinds
>>>
import CLaSH.Prelude
reduceAnd :: (BitPack a, KnownNat (BitSize a)) => a -> Bit Source
Are all bits set to '1'?
>>>
pack (-2 :: Signed 6)
11_1110>>>
reduceAnd (-2 :: Signed 6)
0>>>
pack (-1 :: Signed 6)
11_1111>>>
reduceAnd (-1 :: Signed 6)
1