| Copyright | (C) 2019 Myrtle Software Ltd. 2018 @blaxill 2018 QBayLogic B.V. |
|---|---|
| License | BSD2 (see the file LICENSE) |
| Maintainer | Christiaan Baaij <christiaan.baaij@gmail.com> |
| Safe Haskell | None |
| Language | Haskell2010 |
Clash.Signal.Delayed.Bundle
Description
Synopsis
- class Bundle a where
- data EmptyTuple = EmptyTuple
- data TaggedEmptyTuple (dom :: Domain) (d :: Nat) = TaggedEmptyTuple
Documentation
Isomorphism between a DSignal of a product type
(e.g. a tuple) and a product type of DSignals.
Instances of Bundle must satisfy the following laws:
bundle.unbundle=idunbundle.bundle=id
By default, bundle and unbundle, are defined as the identity, that is,
writing:
data D = A | B instance Bundle D
is the same as:
data D = A | B instance Bundle D where typeUnbundleddom delay D =DSignaldom delay Dbundles = sunbundles = s
Minimal complete definition
Nothing
Methods
bundle :: Unbundled dom d a -> DSignal dom d a Source #
Example:
bundle :: (DSignaldom d a,DSignaldom d b) ->DSignalclk d (a,b)
However:
bundle ::DSignaldomBit->DSignaldomBit
bundle :: DSignal dom d a ~ Unbundled dom d a => Unbundled dom d a -> DSignal dom d a Source #
Example:
bundle :: (DSignaldom d a,DSignaldom d b) ->DSignalclk d (a,b)
However:
bundle ::DSignaldomBit->DSignaldomBit
unbundle :: DSignal dom d a -> Unbundled dom d a Source #
Example:
unbundle ::DSignaldom d (a,b) -> (DSignaldom d a,DSignaldom d b)
However:
unbundle ::DSignaldomBit->DSignaldomBit
unbundle :: Unbundled dom d a ~ DSignal dom d a => DSignal dom d a -> Unbundled dom d a Source #
Instances
Tools to emulate pre Clash 1.0 Bundle () instance
data EmptyTuple Source #
See TaggedEmptyTuple
Constructors
| EmptyTuple |
Instances
data TaggedEmptyTuple (dom :: Domain) (d :: Nat) Source #
Same as Clash.Signal.Bundle.TaggedEmptyTuple, but adapted for DSignal.
Constructors
| TaggedEmptyTuple |