Copyright | (C) 2021-2022 QBayLogic B.V. |
---|---|
License | BSD2 (see the file LICENSE) |
Maintainer | QBayLogic B.V. <devops@qbaylogic.com> |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Synopsis
- data MemBlob (n :: Nat) (m :: Nat) where
- unpackMemBlob :: forall n m. MemBlob n m -> [BitVector m]
- unpackMemBlob0 :: forall n m. MemBlob n m -> IO [BitVector m]
- packBVs :: forall a f. (Foldable f, BitPack a) => Maybe Bit -> f a -> Either String (Int, ByteString, ByteString)
- packAsNats :: forall a f. Foldable f => Int -> (a -> Natural) -> f a -> (ByteString, ByteString)
- unpackNats :: Int -> Int -> ByteString -> ByteString -> [Natural]
- unpackW64s :: ByteString -> [Word64]
- unpackEnds :: Int -> Int -> [Word64] -> [Natural]
Documentation
data MemBlob (n :: Nat) (m :: Nat) where Source #
Efficient storage of memory content
It holds n
words of
.BitVector
m
MemBlob | |
|
unpackMemBlob :: forall n m. MemBlob n m -> [BitVector m] Source #
Convert a MemBlob
back to a list
NB: Not synthesizable
packBVs :: forall a f. (Foldable f, BitPack a) => Maybe Bit -> f a -> Either String (Int, ByteString, ByteString) Source #
packAsNats :: forall a f. Foldable f => Int -> (a -> Natural) -> f a -> (ByteString, ByteString) Source #
unpackNats :: Int -> Int -> ByteString -> ByteString -> [Natural] Source #
unpackW64s :: ByteString -> [Word64] Source #