clash-prelude-1.8.0: Clash: a functional hardware description language - Prelude library
Copyright(C) 2021-2022 QBayLogic B.V.
LicenseBSD2 (see the file LICENSE)
MaintainerQBayLogic B.V. <devops@qbaylogic.com>
Safe HaskellTrustworthy
LanguageHaskell2010

Clash.Explicit.BlockRam.Internal

Description

 
Synopsis

Documentation

data MemBlob (n :: Nat) (m :: Nat) where Source #

Efficient storage of memory content

It holds n words of BitVector m.

Constructors

MemBlob 

Fields

Instances

Instances details
Show (MemBlob n m) Source # 
Instance details

Defined in Clash.Explicit.BlockRam.Internal

Methods

showsPrec :: Int -> MemBlob n m -> ShowS #

show :: MemBlob n m -> String #

showList :: [MemBlob n m] -> ShowS #

unpackMemBlob :: forall n m. MemBlob n m -> [BitVector m] Source #

Convert a MemBlob back to a list

NB: Not synthesizable

unpackMemBlob0 :: forall n m. MemBlob n m -> IO [BitVector m] Source #

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 #